Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Inconsistent ImportError #2027
I am seeing a really weird issue where if I run
Project directory structure:
Perhaps it is a problem on how you are setting up your application for development:
Is your repository public so we can take a look?
I just noticed this:
It seems to me
When Python executes, it will add the path of the script as the first entry in
This is not really a pytest issue, it is how the Python import mechanism works.
One level higher tree looks like:
So you are correct, the
An additional information that could be helpful is that the tests were all working before until I moved app into another directory. e.g.
Also, before moving the directory, I ran
I think the formatting of your example is messed up?
I'm not sure I follow, I see two
If I'm getting the entire picture, the first one is the one causing problems.
I suggest using a different name for the root folder to avoid confusion (something like
I would try