Closed Sbozzolo closed 9 months ago
I also find that I have to run the tests with pytest test/
from the root directory. If I do pytest .
from the test
directory, all the paths in the files fail to be resolved.
I don't quite see why a user of the package should run the tests, they are only meant for developers; that's why pytest is not a dependency. We can change the wording in the documentation to be clearer but I would be against adding the dependency for users (in fact I don't think the test folder is included in the standard pip release). I will post here once I edit the docs!
Indeed, it should not be a direct dependency. You could define dev dependencies (I don't know how this is done with your build system), or at least provide steps in the documentation.
Also, please, have a look at my other comment too:
I also find that I have to run the tests with pytest test/ from the root directory. If I do pytest . from the test directory, all the paths in the files fail to be resolved.
Indeed, it should not be a direct dependency. You could define dev dependencies (I don't know how this is done with your build system), or at least provide steps in the documentation.
I added a [dev] option that installs pytest
and that can be specified during installation:
pip install -e .[dev]
I also find that I have to run the tests with pytest test/ from the root directory. If I do pytest . from the test directory, all the paths in the files fail to be resolved.
I don't see this as a big issue as you're not supposed to run tests from the test folder; anyways, I've added a path variable in conftest.py
which solves the issue.
I don't see this as a big issue as you're not supposed to run tests from the test folder; anyways, I've added a path variable in conftest.py which solves the issue.
I think that I got confused when I read the documentation and saw that you have to run pytest .
, I had assumed that was from tests
. Thanks for fixing this!
The documentation asks to run tests with
pytest
, but the package is not available when installingpyGWB
in a clean environment with the method described in the docs.