ANN: unittest 0.4.2 released

Michael Foord michael at
Tue Jun 8 12:11:18 CEST 2010

unittest2 0.4.2 is now released:

unittest2 is a backport of the new features in the Python 2.7 version of 
the standard library testing framework unittest.

The major improvements over unittest in Python 2.6 include:

* A standard test runner with automatic test discovery
* Improved command line options - fail fast, control-c catching and 
buffering standard out
* Many new assert methods
* Improvements to assertRaises (as context manager) and 
assertAlmostEqual (delta keyword argument)
* Class and module level setup and teardown
* Cleanup functions for better resource handling
* Test skipping and expected failures
* Lots of other minor changes and improvements

For more details see:

Version 0.4.2 has feature parity with the version of unittest in Python 
2.7 RC 1. There are a few bug fixes since version 0.4.1.

2010/06/06 - 0.4.2

Improved help message for ``unit2 discover -h``.

SkipTest in unittest.TestCase.setUpClass or setUpModule is now reported 
as a
skip rather than an error.

Excessively large diffs due to ``TestCase.assertSequenceEqual`` are no
longer included in failure reports. (Controlled by ``TestCase.maxDiff``.)

Matching files during test discovery is done in 
``TestLoader._match_path``. This
method can be overriden in subclasses to, for example, match on the full 
path instead of the name only or use regular expressions for matching.

Addition of a setuptools compatible entrypoint for the unit2 test runner 
Contributed by Chris Withers.

Tests fixed to be compatible with Python 2.7, where deprecation warnings 
silenced by default.

Feature parity with unittest in Python 2.7 RC 1.

All the best,

Michael Foord


More information about the Python-announce-list mailing list