Skip to content

Commit

Permalink
Doc fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Macagno <fabrice.macagno@al.com.au>
  • Loading branch information
fabal committed Jun 25, 2024
1 parent 6466a13 commit 471b065
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions docs/source/package_commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -376,20 +376,6 @@ Following is a list of the objects and functions available.
if building:
env.FOO_INCLUDE_PATH = "{root}/include"
.. py:attribute:: testing
:type: bool

This boolean variable is ``True`` if a test is occurring (typically done via the :ref:`rez-test` tool),
and ``False`` otherwise.

Typically a package will use this variable to set environment variables that are only relevant during test
execution.

.. code-block:: python
if testing:
env.FOO_TEST_DATA_PATH = "{root}/tests/data"
.. py:function:: command(arg: str)
Run an arbitrary shell command.
Expand Down Expand Up @@ -721,6 +707,19 @@ Following is a list of the objects and functions available.
if test.name == "unit":
info("My unit test is about to run yay")
.. py:attribute:: testing
:type: bool

This boolean variable is ``True`` if a test is occurring (typically done via the :ref:`rez-test` tool),
and ``False`` otherwise.

A package can use this variable to set environment variables that are only relevant during test execution.

.. code-block:: python
if testing:
env.FOO_TEST_DATA_PATH = "{root}/tests/data"
.. py:attribute:: this
The ``this`` object represents the current package. The following attributes are most commonly used
Expand Down

0 comments on commit 471b065

Please sign in to comment.