Re:Solving Algorithmic Problems in Python with Pytest (2019)
by andreareina on Saturday December 19, 2020 @12:06PM
(#25478877)
Pytest:
- lets you use regular assert statements, rather than assertEqual, assertTrue, etc.
- does not impose the use of classes
- the way it does fixtures just feels nicer to use than unittest
Basically, it's more ergonomic and IME more flexible.
I really wish more was said than just this. Why is it that pytest is often preferred and unittest is considered a bad choice? What is the impact on the quality of the tests?