Skip to content

Commit 1582d03

Browse files
authored
Merge pull request #124 from ev-br/skip_empty
Skip empty doctests, stop blank filtering DeprecationWarnings
2 parents 9dd1632 + 4c8ff06 commit 1582d03

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

scpdt/plugin.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def collect(self):
181181
# We utilize scpdt's `find_doctests` function to discover doctests in public, non-deprecated objects in the module
182182
# NB: additional postprocessing in pytest_collection_modifyitems
183183
for test in find_doctests(module, strategy="api", name=module.__name__, config=dt_config):
184-
# if test.examples: # skip empty doctests # FIXME: put this back (simplifies comparing the logs)
184+
if test.examples: # skip empty doctests
185185
yield doctest.DoctestItem.from_parent(
186186
self, name=test.name, runner=runner, dtest=test
187187
)
@@ -259,10 +259,7 @@ def run(self, test, compileflags=None, out=None, clear_globs=False):
259259
with np_errstate():
260260
with config.dt_config.user_context_mgr(test):
261261
with matplotlib_make_nongui():
262-
# XXX: might want to add the filter to `testmod`, too
263-
with warnings.catch_warnings():
264-
warnings.filterwarnings("ignore", category=DeprecationWarning)
265-
super().run(test, compileflags=compileflags, out=out, clear_globs=clear_globs)
262+
super().run(test, compileflags=compileflags, out=out, clear_globs=clear_globs)
266263

267264
"""
268265
Almost verbatim copy of `_pytest.doctest.PytestDoctestRunner` except we utilize

0 commit comments

Comments
 (0)