Skip to content

Commit c59a358

Browse files
committed
MAINT: plumb pytest_extra_skips through to DTConfig
1 parent 8b37663 commit c59a358

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scpdt/impl.py

+9
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ class DTConfig:
6868
NameErrors. Set to True if you want to see these, or if your test
6969
is actually expected to raise NameErrors.
7070
Default is False.
71+
pytest_extra_skips : list
72+
A list of names/modules to skip when run under pytest plugin. Ignored
73+
otherwise.
7174
7275
"""
7376
def __init__(self, *, # DTChecker configuration
@@ -88,6 +91,7 @@ def __init__(self, *, # DTChecker configuration
8891
# Obscure switches
8992
parse_namedtuples=True, # Checker
9093
nameerror_after_exception=False, # Runner
94+
pytest_extra_skips=None, # plugin/collection
9195
):
9296
### DTChecker configuration ###
9397
# The namespace to run examples in
@@ -171,6 +175,11 @@ def __init__(self, *, # DTChecker configuration
171175
self.parse_namedtuples = parse_namedtuples
172176
self.nameerror_after_exception = nameerror_after_exception
173177

178+
#### pytest plugin additional switches
179+
if pytest_extra_skips is None:
180+
pytest_extra_skips = []
181+
self.pytest_extra_skips = pytest_extra_skips
182+
174183

175184
def try_convert_namedtuple(got):
176185
# suppose that "got" is smth like MoodResult(statistic=10, pvalue=0.1).

0 commit comments

Comments
 (0)