Skip to content

Commit 1c7644c

Browse files
committed
config: some comments
1 parent 5f23157 commit 1c7644c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/_pytest/config/__init__.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,14 +345,21 @@ def __init__(self) -> None:
345345
import _pytest.assertion
346346

347347
super().__init__("pytest")
348-
# The objects are module objects, only used generically.
349-
self._conftest_plugins: Set[types.ModuleType] = set()
350348

351-
# State related to local conftest plugins.
349+
# -- State related to local conftest plugins.
350+
# All loaded conftest modules.
351+
self._conftest_plugins: Set[types.ModuleType] = set()
352+
# All conftest modules applicable for a directory.
353+
# This includes the directory's own conftest modules as well
354+
# as those of its parent directories.
352355
self._dirpath2confmods: Dict[Path, List[types.ModuleType]] = {}
356+
# The conftest module of a conftest path.
353357
self._conftestpath2mod: Dict[Path, types.ModuleType] = {}
358+
# Cutoff directory above which conftests are no longer discovered.
354359
self._confcutdir: Optional[Path] = None
360+
# If set, conftest loading is skipped.
355361
self._noconftest = False
362+
356363
self._duplicatepaths: Set[Path] = set()
357364

358365
# plugins that were explicitly skipped with pytest.skip

0 commit comments

Comments
 (0)