Skip to content

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

@quati

Description

@quati

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions