-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
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:
repro_case/
repro_case/a/
repro_case/a/test_a.py
The contents of "a/test_a.py" are
def test_a():
pass
In the repro_case directory, running pytest
by itself passes the trivial test, but running pytest -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 list
inside 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