Skip to content

__init__.py in tests directory results in shared library not being found? #1530

Closed Answered by henryiii
golmschenk asked this question in Q&A
Discussion options

You must be logged in to vote

The default mechanism (prepend) for loading has drawbacks in pytest - it's prepending the path that the tests module is in to the path before running python, which is why it's picking the unbuilt package up. I highly recommend the src/<package> structure. Anyway, could you try using Python's import system (--import-mode=importlib)?

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@joerick
Comment options

@henryiii
Comment options

Answer selected by golmschenk
@golmschenk
Comment options

@joerick
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants