Closed draked2 closed 3 years ago
Firstly, there is no extra called test
on this repo:
There is a test_minimal
which currently just adds pytest, and a test_full
which includes all the optional stuff so it should be either of those inside the square brakets.
I'm not a pipenv user (prefer plain old venv) so I don't know if this is correct usage but this appeared to work for me:
pipenv install
pipenv shell
pip install -e .[test_minimal]
Then you should be able to launch the test suite via pytest:
pytest
Just running it now I see a couple of breakages have trickled in so don't be surprised if these fail:
FAILED tests/test_imageio.py::test_read[JPEG-True] - assert False
FAILED tests/test_imageio.py::test_read[JPEG-False] - assert False
FAILED tests/test_misc.py::test_data - AssertionError
Thanks for the details. Your recommendations do result in a pipenv virtual environment with the required dependencies.
However it's a bit of a work-around. When you install dependencies from within the pipenv shell, they aren't tracked in the pipfile. I did a bit of digging and it looks like there is an open issue with pipenv when installing from setup.py if the setup.py needs to be evaluated first (https://github.com/pypa/pipenv/issues/4309).
This is out of scope of vtkplotlib so I'll close this issue for now
Steps to reproduce:
pipenv install
to create a pipenvpipenv install '-e .[test]'
to get pipenv to create an environment with required dependenciesResult:
ModuleNotFoundError: No module named 'sys.version_info'; 'sys' is not a package
Excuse me, I'm new to setup.py and I might be missing something here. Any suggestions on what extra I could do to easily make a pipenv environment capable of running the unit tests in this repo?