[TIP] unittest 0.4.2 released

Michael Foord michael at voidspace.org.uk
Sun Jun 6 13:06:01 PDT 2010


Hello all,

unittest2 0.4.2 is now released:

http://pypi.python.org/pypi/unittest2/

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 
assertAlmostEquals (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:

http://www.voidspace.org.uk/python/articles/unittest2.shtml

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 
file
path or use regular expressions for matching.

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

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

Feature parity with unittest in Python 2.7 RC 1.

All the best,

Michael Foord

-- 
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog

READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.





More information about the testing-in-python mailing list