Hacker News new | ask | show | jobs
by mivade 3234 days 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.

1 comments

Yield fixtures are just awesome for mocking, but the magical global dependency injection definitely makes you feel a bit weird on occasion
especially in combination with pytest-mock.