JonasSC / PythonistManifesto

A short introduction to programming with Python for advanced beginners
0 stars 1 forks source link

Suggest py.test instead of Unittest #4

Open mgeier opened 9 years ago

mgeier commented 9 years ago

It needs much less boilerplate and therefore is ironically more Pythonic than Pythons own unittest module.

http://pytest.org/

JonasSC commented 9 years ago

The mass of code, to get unit tests started and the weird way, how they are started (by importing TestCase-classes, rather than instantiating them) annoyed me aswell.

Nevertheless, there are some cases, where installing and updating third party libraries can be a bit of a problem (on embedded systems and sometimes on Windows). Also, I have to look, if the IDE integration for py.test is as good as for the unittest module.

I'll probably add a general section about the importance of testing in the "Software Architecture" chapter and then write a short introduction for both py.test and unittest in the tools-chapter.