NEWS & docs.

This commit is contained in:
Jonathan Lange
2011-07-27 21:21:53 +01:00
parent 25a248ac1b
commit 7e2ff8c6a1
2 changed files with 8 additions and 3 deletions

4
NEWS
View File

@@ -39,6 +39,10 @@ Improvements
* Correctly display non-ASCII unicode output on terminals that claim to have a
unicode encoding. (Martin [gz], #804122)
* ``ExpectedException`` now matches any exception of the given type by
default, and also allows specifying a ``Matcher`` rather than a mere regular
expression. (Jonathan Lange, #791889)
* ``FixtureSuite`` added, allows test suites to run with a given fixture.
(Jonathan Lange)

View File

@@ -160,9 +160,10 @@ particular errors. ``ExpectedException`` does just that. For example::
silly.square('orange')
The first argument to ``ExpectedException`` is the type of exception you
expect to see raised. The second argument is an optional regular expression,
if provided, the ``str()`` of the raised exception must match the regular
expression.
expect to see raised. The second argument is optional, and can be either a
regular expression or a matcher. If it is a regular expression, the ``str()``
of the raised exception must match the regular expression. If it is a matcher,
then the raised exception object must match it.
assertIn, assertNotIn