From 4f6cab7bf121e780f59c0fd7661887e3c2c76d23 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Wed, 14 Feb 2024 15:56:05 -0300 Subject: [PATCH] Improve docs a bit --- doc/en/reference/customize.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/en/reference/customize.rst b/doc/en/reference/customize.rst index 6c339b889..cab111726 100644 --- a/doc/en/reference/customize.rst +++ b/doc/en/reference/customize.rst @@ -183,10 +183,14 @@ even if it does not contain a ``[tool.pytest.ini_options]`` table (this was adde The files are considered in the order above. Options from multiple ``configfiles`` candidates are never merged - the first match wins. +The configuration file also determines the value of the ``rootpath``. + The :class:`Config ` object (accessible via hooks or through the :fixture:`pytestconfig` fixture) will subsequently carry these attributes: -- :attr:`config.rootpath `: the determined root directory, guaranteed to exist. +- :attr:`config.rootpath `: the determined root directory, guaranteed to exist. It is used as + a reference directory for constructing test addresses ("nodeids") and can be used also by plugins for storing + per-testrun information. - :attr:`config.inipath `: the determined ``configfile``, may be ``None`` (it is named ``inipath`` for historical reasons). @@ -196,9 +200,7 @@ will subsequently carry these attributes: versions of the older ``config.rootdir`` and ``config.inifile``, which have type ``py.path.local``, and still exist for backward compatibility. -The ``rootdir`` is used as a reference directory for constructing test -addresses ("nodeids") and can be used also by plugins for storing -per-testrun information. + Example: