-
Notifications
You must be signed in to change notification settings - Fork 217
Open
Labels
maintenancedoesn't necessarily have an immediate impact on usersdoesn't necessarily have an immediate impact on users
Description
Disclaimer: I'm biased towards pytest, it's used in most python projects, and I think it has been the standard in python for quite some time.
That said, I truly think the codebase would benefit from migrating to pytest
- we already use pytest to run the tests anway, so it wouldn't add a dependency.
- Simpler assertions: No more
self.assertEqual(...), a simpleassert a = bis ok. - we already have a few pytest fixtures, it's more powerful and (IMO) readable than setUp / teardown methods. I admit that this is the most biased argument I have, some people may disagree on fixtures being better than factories / setup functions.
- pytest does not require to use classes, simple functions are fine, which is enough for simple tests (we can still use classes for bigger ones)
- parametrize avoids a lot of redundancy
- a lot of plugins are available, if we ever need any (let's say to run tests in parallel, or to randomize test order for example)
Metadata
Metadata
Assignees
Labels
maintenancedoesn't necessarily have an immediate impact on usersdoesn't necessarily have an immediate impact on users