2 ms·
> They backported the Python 2.7 unittest module to Python 2.4 No, unittest2 is a project by unittest's own maintainer (Michael Foord): http://www.voidspace.or
by masklinn 16y ago
> They backported the Python 2.7 unittest module to Python 2.4
No, unittest2 is a project by unittest's own maintainer (Michael Foord): http://www.voidspace.org.uk/python/articles/unittest2.shtml http://www.voidspace.org.uk/python/articles/unittest2.shtml
> and included it in Django?
A good thing, short of depending on unittest2 itself (I don't believe Django "accepts" to depend on third-party projects as it's supposed to be self-contained).
unittest2 is a really big improvement over the old unittest, there are new (and better) assertions, improved comparisons (which diff containers on mismatches for instance, and the equality assertions are pluggable), improved fixtures (class and module-level setup and teardown), improved cleanups (separate from teardowns), autodiscovery has finally been included and is pluggable (you can override it for your modules), etc...
Because Django 1.2 has its own layer on top of unittest (to do basic setup and fixtures loading for the developer and integrate with management commands for instance), using unittest2 with it is a pain.
I, for one, am very happy with this development.
> It is getting enterprisey.
Because they bundle a preexisting library instead of developing yet-another-unit-testing-library?