CherryPy currently relies on the nose framework for running tests. I suspect it has mostly small reliance on the specifics of nose, so it should be a fairly straightforward change to support using pytest as the runner.
There are many reasons the project should switch to pytest over nose:
- Pytest has better failure reporting, including assert rewrites. With pytest, if something fails, it reports the traceback, and the variables in the scope, and what values were present that failed an assertion.
- Pytest has assert rewrites - so that simple asserts can be easily assessed.
- Pytest does nice diffs of lists and dicts, masking the common elements and quickly getting to the differences that caused the failure.
- Pytest has nicer semantics for selecting and deselecting tests.
- Pytest has better configurability around test collection.
- Pytest has a bigger suite of plugins, better community support, and more rapid issue resolution.
- Pytest has built in support for pluggable fixtures and monkeypatching (mocks).
I realize some of these assertions I've made are subjective, but in my experience, py.test is superior in almost every way. It's a constant frustration to me that I can't use some of the powerful features of pytest.
I do love nose for its namesake, and the minimal output during test runs is nice, but those benefits pale in comparison to those I'm missing above.
Are there any objections to dropping nose and adopting pytest as the test framework?
CherryPy currently relies on the nose framework for running tests. I suspect it has mostly small reliance on the specifics of nose, so it should be a fairly straightforward change to support using pytest as the runner.
There are many reasons the project should switch to pytest over nose:
I realize some of these assertions I've made are subjective, but in my experience, py.test is superior in almost every way. It's a constant frustration to me that I can't use some of the powerful features of pytest.
I do love nose for its namesake, and the minimal output during test runs is nice, but those benefits pale in comparison to those I'm missing above.
Are there any objections to dropping nose and adopting pytest as the test framework?