Closed alchemyst closed 6 years ago
This commit 03ed23a145b6f29279e28c7b66b81e2804653cbe refactors the test suite to run both pytest and unittest which both pass locally, the setup.py and .yml files have also been updated. This commit 9af4c2415fdd104794b9a4a70b21401f7bec2924 removes unittests entirely. We still use numpy.testing for most of our assertions which is also replacable with pytest if needed.
The Travis log failed to run python -m pytest -v
, I will read the documentation to see what we need to run py.test.
You call pytest just with the command pytest
and configure the settings in pytest.ini
For coverage to work, you need to use pytest-cov.
PS: Remember you can refer to an issue number in the commit message to automatically close an issue. (So a commit message "Moved to pytest, closes #11") would close this issue as soon as you push it.
Travis is passing with e7780ee. I will test another commit to see if coveralls works using pytest-cov, coverage appears to have decreased on https://coveralls.io/github/Stefan-Endres/shgo for some reason.
Thank you for the commit message tip!
pytest is superior to UnitTest in almost every way. SciPy is also moving their test suite to pytest in the 1.0.0 release