-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
plugin: doctestsrelated to the doctests builtin pluginrelated to the doctests builtin plugintopic: collectionrelated to the collection phaserelated to the collection phasetype: bugproblem that needs to be addressedproblem that needs to be addressed
Description
Origin: question on SO
Prep for reproducing:
$ mkdir issue
$ printf 'def test_spam():\n assert True\n' > issue/test_eggs.py
$ pytest issue/test_eggs.py::test_spam
========================================================== test session starts ==========================================================
platform darwin -- Python 3.6.4, pytest-3.7.2, py-1.5.4, pluggy-0.7.1
rootdir: /private/tmp, inifile:
collected 1 item
issue/test_eggs.py . [100%]
======================================================= 1 passed in 0.01 seconds ========================================================
Adding --doctest-modules
to the previous command fails the test run:
$ pytest issue/test_eggs.py::test_spam --doctest-modules
========================================================== test session starts ==========================================================
platform darwin -- Python 3.6.4, pytest-3.7.2, py-1.5.4, pluggy-0.7.1
rootdir: /private/tmp, inifile:
collecting 0 items
===================================================== no tests ran in 0.00 seconds ======================================================
ERROR: not found: /private/tmp/issue/test_eggs.py::test_spam
(no name '/private/tmp/issue/test_eggs.py::test_spam' in any of [<DoctestModule 'issue/test_eggs.py'>, <Module 'issue/test_eggs.py'>])
Cykooz
Metadata
Metadata
Assignees
Labels
plugin: doctestsrelated to the doctests builtin pluginrelated to the doctests builtin plugintopic: collectionrelated to the collection phaserelated to the collection phasetype: bugproblem that needs to be addressedproblem that needs to be addressed