From 471b0658bcf8d27419bcbec7338c3ede231a96de Mon Sep 17 00:00:00 2001 From: Fabrice Macagno Date: Tue, 25 Jun 2024 17:30:04 +1000 Subject: [PATCH] Doc fixes Signed-off-by: Fabrice Macagno --- docs/source/package_commands.rst | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/docs/source/package_commands.rst b/docs/source/package_commands.rst index a392346e4..3c2c1aa88 100644 --- a/docs/source/package_commands.rst +++ b/docs/source/package_commands.rst @@ -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. @@ -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