Skip to content

Commit 5b0e255

Browse files
authored
Merge pull request #6465 from blueyed/doc-rootdir
doc: revisit section about rootdir
2 parents f0fdafe + bebfd28 commit 5b0e255

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

doc/en/customize.rst

+4-6
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ which were registered by installed plugins.
2020
Initialization: determining rootdir and inifile
2121
-----------------------------------------------
2222

23-
24-
2523
pytest determines a ``rootdir`` for each test run which depends on
2624
the command line arguments (specified test files, paths) and on
2725
the existence of *ini-files*. The determined ``rootdir`` and *ini-file* are
@@ -30,17 +28,17 @@ printed as part of the pytest header during startup.
3028
Here's a summary what ``pytest`` uses ``rootdir`` for:
3129

3230
* Construct *nodeids* during collection; each test is assigned
33-
a unique *nodeid* which is rooted at the ``rootdir`` and takes in account full path,
34-
class name, function name and parametrization (if any).
31+
a unique *nodeid* which is rooted at the ``rootdir`` and takes into account
32+
the full path, class name, function name and parametrization (if any).
3533

3634
* Is used by plugins as a stable location to store project/test run specific information;
3735
for example, the internal :ref:`cache <cache>` plugin creates a ``.pytest_cache`` subdirectory
3836
in ``rootdir`` to store its cross-test run state.
3937

40-
Important to emphasize that ``rootdir`` is **NOT** used to modify ``sys.path``/``PYTHONPATH`` or
38+
``rootdir`` is **NOT** used to modify ``sys.path``/``PYTHONPATH`` or
4139
influence how modules are imported. See :ref:`pythonpath` for more details.
4240

43-
``--rootdir=path`` command-line option can be used to force a specific directory.
41+
The ``--rootdir=path`` command-line option can be used to force a specific directory.
4442
The directory passed may contain environment variables when it is used in conjunction
4543
with ``addopts`` in a ``pytest.ini`` file.
4644

0 commit comments

Comments
 (0)