@@ -79,7 +79,7 @@ class DTConfig:
7979 Default is False.
8080 pytest_extra_ignore : list
8181 A list of names/modules to ignore when run under pytest plugin. This is
82- equivalent to using `--ignore=...` cmdline switch.
82+ equivalent to using `` --ignore=...` ` cmdline switch.
8383 pytest_extra_skip : dict
8484 Names/modules to skip when run under pytest plugin. This is
8585 equivalent to decorating the doctest with `@pytest.mark.skip` or adding
@@ -92,6 +92,11 @@ class DTConfig:
9292 adding `# may vary` to the outputs of all examples.
9393 Each key is a doctest name to skip, and the corresponding value is
9494 a string. If not empty, the string value is used as the skip reason.
95+ pytest_extra_requires : dict
96+ Paths to conditionally ignore unless requirements are met.
97+ The format is ``{path/or/glob/pattern: requirement}``, where the values are
98+ PEP 508 dependency specifiers. If a requirement is not met, the behavior
99+ is equivalent to using the ``--ignore=...`` command line switch.
95100 CheckerKlass : object, optional
96101 The class for the Checker object. Must mimic the ``DTChecker`` API:
97102 subclass the `doctest.OutputChecker` and make the constructor signature
@@ -125,6 +130,7 @@ def __init__(self, *, # DTChecker configuration
125130 pytest_extra_ignore = None ,
126131 pytest_extra_skip = None ,
127132 pytest_extra_xfail = None ,
133+ pytest_extra_requires = None ,
128134 ):
129135 ### DTChecker configuration ###
130136 self .CheckerKlass = CheckerKlass or DTChecker
@@ -217,6 +223,7 @@ def __init__(self, *, # DTChecker configuration
217223 self .pytest_extra_ignore = pytest_extra_ignore or []
218224 self .pytest_extra_skip = pytest_extra_skip or {}
219225 self .pytest_extra_xfail = pytest_extra_xfail or {}
226+ self .pytest_extra_requires = pytest_extra_requires or {}
220227
221228
222229def try_convert_namedtuple (got ):
0 commit comments