We're using nose to run our Python tests, and it was last updated in 2015. @hashar is suggesting switching to pytest, so let's move to the future and make the switch! :)
Description
Details
Related Objects
- Mentioned In
- rWFDV092fabbb6de1: Update fundraising-tools tox helper script
- Mentioned Here
- rWFTOaf3543274947: Use pynose to provide nosetests
Event Timeline
nose is obsolete indeed and I mentioned it cause I found it at:
nose
And that is the command being invoked:
commands = nosetests -v {posargs} {toxinidir}
Then in af3543274947e058f3ba696e9db51a920332076b you went to add https://pypi.org/project/pynose / https://github.com/mdmintz/pynose
pynose
pynose should probably moved to test-requirements and nose be removed. Then I guess you can check whether pytest is worth adopting (I think you should, it has a lot more features).
Change #1173942 had a related patch set uploaded (by Hashar; author: Hashar):
[wikimedia/fundraising/tools@master] Remove nose, move pynose to test-requirements.txt
Change #1173945 had a related patch set uploaded (by Hashar; author: Hashar):
[wikimedia/fundraising/tools@master] tests: remove "mock" requirement
At a quick glance there are some assertions using nose.tools.assert_equals they can be replaced by Python built-in assert, pytest would handle them and craft a nice report.
With pytest, I don't think you need to set maxDiff anymore:
# weird thing we have to do to get better assert_equals feedback nose.tools.assert_equals.__self__.maxDiff = None
And instead run pytest with verbose mode to have the max diff (pytest -vv).
Change #1173942 merged by jenkins-bot:
[wikimedia/fundraising/tools@master] tests: remove nose, move pynose to test-requirements.txt
Change #1173945 merged by jenkins-bot:
[wikimedia/fundraising/tools@master] tests: remove "mock" requirement
Change #1175485 had a related patch set uploaded (by Hashar; author: Hashar):
[wikimedia/fundraising/tools@master] Migrate from nose to pytest
Change #1175485 merged by jenkins-bot:
[wikimedia/fundraising/tools@master] Migrate from nose to pytest