-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Internal error when using -m option ending in forward slash #4051
Copy link
Copy link
Closed
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributortopic: reportingrelated to terminal output and user-facing messages and errorsrelated to terminal output and user-facing messages and errorstype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch
Metadata
Metadata
Assignees
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributortopic: reportingrelated to terminal output and user-facing messages and errorsrelated to terminal output and user-facing messages and errorstype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch
Type
Fields
Give feedbackNo fields configured for issues without a type.
I accidentally stumbled upon this bug when I used -m instead of --pyargs in one of my projects:
https://gist.github.com/boustrophedon/338a6572e52d6d44c9175783e9657209
Environment: Linux, Python 3.7 and Pytest 3.8.1 both via pipenv
To reproduce, create a directory structure that looks like:
The contents of "a/test_a.py" are
In the repro_case directory, running
pytestby itself passes the trivial test, but runningpytest -m a/crashes and produces the linked error.The crash does not occur if there is no test_a.py file, or if the test_a.py file is empty.
pip listinside the virtualenv produces:Package Version
atomicwrites 1.2.1
attrs 18.2.0
more-itertools 4.3.0
pip 18.0
pluggy 0.7.1
py 1.6.0
pytest 3.8.1
setuptools 40.4.3
six 1.11.0
wheel 0.31.1