Closed ziotom78 closed 4 years ago
@ziotom78 Thanks for pointing this out.
Initially I was unable to reproduce this error. With a quick search, I found that this could be caused when pytest is installed outside of a virtual environment where the package is installed (https://medium.com/@dirk.avery/pytest-modulenotfounderror-no-module-named-requests-a770e6926ac5). I did it and got the error.
The fix you suggested is working in that case. I will add a comment about this in the README.
With a quick search, I found that this could be caused when pytest is installed outside of a virtual environment where the package is installed (https://medium.com/@dirk.avery/pytest-modulenotfounderror-no-module-named-requests-a770e6926ac5). I did it and got the error.
Yes, this was indeed the case, but then I installed pytest
under my virtualenv, downloaded and installed tools21cm
again and the error kept popping out. I believe it's safer for the general user if you provide the python -m ptyest
command.
Okay, I will do that.
While testing from the package directory, the command should be python -m pytest tests/
and inside the tests
directory, it should python -m pytest
. Is this correct?
While testing from the package directory, the command should be python -m pytest tests/ and inside the tests directory, it should python -m pytest. Is this correct?
Right, I can confirm it works in both ways.
The README and the instructions in the readthedocs documentation have been updated.
Running
pytest -v
as stated in the README causes the following errors:This can be fixed using the trick explained in a StackOverflow answer, i.e., using the command
python -m pytest tests/
:Perhaps it would be good to update the README.
(This issue was triggered while reviewing the JOSS paper.)