nose2 plugins

In the previous section, we saw how we needed to enable the Layers plugin before we could run our layer tests. nose2 comes with a large set of plugins that enhance or extend its behavior. In fact, support for all the parameterized tests and generated tests that we saw earlier are actually implemented as nose2 plugins. The difference is that parameterized and generated tests are loaded by default, so we didn't need to explicitly enable them.

In this section, we'll take a look at some of the popular plugins. Keep in mind that there are many more plugins that we aren't going to discuss here.

Doctest support

If we have not integrated doctests into the unittest framework as described in the previous chapter, then we can configure nose2 to ...

Get Test-Driven Python Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.