Closed
Description
The --pyargs
command-line switch cannot locate libraries within a namespace package that are installed in editable mode.
How to reproduce
-
In a fresh virtual environment install the attached pinned requirements:
$ virtualenv env $ source env/bin/activate $ pip install -r pinned_requirements.txt
This will install three libraries (more.basicauth, more.chameleon, more.forwarded) in editable mode, together with their dependencies.
These libraries are all defined within the
more
namespace package. -
Run
$ py.test --pyargs more.chamaleon
This is the output I get:
$ py.test --pyargs more.chamaleon
==================================================================== test session starts =====================================================================
platform darwin -- Python 2.7.11, pytest-2.9.1, py-1.4.31, pluggy-0.3.1
rootdir:[…]/pytest_bug, inifile:
plugins: cov-2.2.1
================================================================ no tests ran in 0.00 seconds ================================================================
ERROR: file or package not found: more.chamaleon
Expected output
I expect that py.test invocation to produce similar output as
$ py.test env/src/more.chameleon/more
==================================================================== test session starts =====================================================================
platform darwin -- Python 2.7.11, pytest-2.9.1, py-1.4.31, pluggy-0.3.1
rootdir: […]/pytest_bug/env/src/more.chameleon, inifile:
plugins: cov-2.2.1
collected 5 items
env/src/more.chameleon/more/chameleon/tests/test_chameleon.py .....
================================================================== 5 passed in 0.51 seconds ==================================================================
Metadata
Metadata
Assignees
Labels
No labels