Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation polutes the site-packages with tests blocking imports from local directory tests #131

Open
quati opened this issue Feb 12, 2021 · 0 comments · May be fixed by #138
Open

Installation polutes the site-packages with tests blocking imports from local directory tests #131

quati opened this issue Feb 12, 2021 · 0 comments · May be fixed by #138

Comments

@quati
Copy link

quati commented Feb 12, 2021

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 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.

@nklapste nklapste linked a pull request May 15, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant