When graypy 2.1.0 is installed it creates (copies) the tests directory to the site-packages directly.
This makes impossible to import local directory tests if it's present.
I have a project with following structure:
- my_application # Application's code
- tests # PyTest unittests
- conftest.py # tests setup and some helper functions
- ...
- features # Behave tests, etc.
- environment.py
- ...
When in environment.py I want to import some tools from tests/conftest.py (to reuse some code between tests) and call
from tests.conftest import foo
I get an ImportError because by default site-packages/tests is imported.
Only "universal" workaround I found is to delete the tests directory in site-packages.
However it would be nice to not place it there in the first-place and either install the tests dir in site-packages/graypy/tests or not at all.
Hi!
When graypy 2.1.0 is installed it creates (copies) the
tests
directory to the site-packages directly. This makes impossible to import local directorytests
if it's present.I have a project with following structure:
When in
environment.py
I want to import some tools fromtests/conftest.py
(to reuse some code between tests) and callI get an
ImportError
because by defaultsite-packages/tests
is imported.Only "universal" workaround I found is to delete the
tests
directory insite-packages
.However it would be nice to not place it there in the first-place and either install the tests dir in
site-packages/graypy/tests
or not at all.