26 ms·
If for no other reason, pytest requires a lot less boilerplate. Pytest fixtures are also quite a bit more flexible than unittest's setUp and tearDown methods,
by mivade 9y ago
If for no other reason, pytest requires a lot less boilerplate.
Pytest fixtures are also quite a bit more flexible than unittest's setUp and tearDown methods, although they take a little while to really understand (at least they did for me) since they use some magic.
- bpicolo 9y agoYield fixtures are just awesome for mocking, but the magical global dependency injection definitely makes you feel a bit weird on occasion
- quodlibetor 9y agoespecially in combination with pytest-mock.
- deleted 9y ago[deleted]