Closed vsajip closed 1 year ago
This is a standard feature of the src layout.
After creating the venv, install the package, pip install -e .
Then the just test
command runs as expected.
Adding these steps to a Running the tests section of the readme (but just using plain venv
) would help folks get started, yes?
Adding these steps
Yes, I think it would. I guess the src
layout is common, but I don't use it myself, and this is the first project where I've hit this snag!
Example:
Create a brand new venv and install Django into it.
Run the tests with the environment active.
The problem is that the
tests
are relative to the project root, but the source is insrc
. If we passPYTHONPATH
in the environment, all is well:OK Destroying test database for alias 'default'...