On Mon, Nov 24, 2025, at 7:35 AM, Jeremy Stanley wrote:
On 2025-11-24 09:41:03 +0100 (+0100), Radomir Dopieralski wrote:
I've been reading this discussion, and I don't really have anything to add to this, except that I've seen the term "standard compliant test cases" used quite a lot, and I'm a little bit confused by it. Would you be so nice and please link to the relevant specification, so that everyone can see what standard exactly you are talking about? Thank you! [...]
My understanding is that it's shorthand for "works with any runner compatible with the unittest module in CPython's standard library." So basically keeping things flexible and not locking the project into a specific test runner or breaking the ability to e.g. serialize results into subunit protocol format.
Yes the unittest module defines a number of interfaces and behaviors for test cases, test classes, test case discovery, test loaders, and test runners. The documentation for this can be found in the python unittest documentation: https://docs.python.org/3/library/unittest.html. A simplified way of thinking about this would be to check if the built in high level unittest test runner can load and run your tests: https://docs.python.org/3/library/unittest.html#unittest.main. Maintaining compatiblity with these interfaces generally ensures that you can use whichever test runner you prefer. Whether that be nose, testr, stestr, pytest, unittest.main, or whatever tooling is built into your IDE.