[Python-checkins] r79349 - python/trunk/Doc/whatsnew/2.7.rst

andrew.kuchling python-checkins at python.org
Tue Mar 23 19:39:24 CET 2010


Author: andrew.kuchling
Date: Tue Mar 23 19:39:24 2010
New Revision: 79349

Log:
add some unittest items

Modified:
   python/trunk/Doc/whatsnew/2.7.rst

Modified: python/trunk/Doc/whatsnew/2.7.rst
==============================================================================
--- python/trunk/Doc/whatsnew/2.7.rst	(original)
+++ python/trunk/Doc/whatsnew/2.7.rst	Tue Mar 23 19:39:24 2010
@@ -1139,21 +1139,28 @@
 * :meth:`loadTestsFromName` properly honors the ``suiteClass`` attribute of
   the :class:`TestLoader`. (Fixed by Mark Roddy; :issue:`6866`.)
 
-* A new hook, :meth:`addTypeEqualityFunc` takes a type object and a
-  function.  The :meth:`assertEqual` method will use the function
-  when both of the objects being compared are of the specified type.
-  This function should compare the two objects and raise an
-  exception if they don't match; it's a good idea for the function
-  to provide additional information about why the two objects are
-  matching, much as the new sequence comparison methods do.
-
-:func:`unittest.main` now takes an optional ``exit`` argument.
-If False ``main`` doesn't call :func:`sys.exit` allowing it to
-be used from the interactive interpreter. :issue:`3379`.
+* A new hook lets you extend the :meth:`assertEqual` method to handle
+  new data types.  The :meth:`addTypeEqualityFunc` method takes a type
+  object and a function. The function will be used when both of the
+  objects being compared are of the specified type.  This function
+  should compare the two objects and raise an exception if they don't
+  match; it's a good idea for the function to provide additional
+  information about why the two objects are matching, much as the new
+  sequence comparison methods do.
+
+:func:`unittest.main` now takes an optional ``exit`` argument.  If
+false, :func:`main` doesn't call :func:`sys.exit`, allowing it to be
+used from the interactive interpreter. (Contributed by J. Pablo
+Fernández; :issue:`3379`.)
+
+A new command-line switch, :option:`-f` or :option:`--failfast`, makes
+test execution stop immediately when a test fails instead of
+continuing to execute further tests.  (Suggested by Cliff Dyer and
+implemented by Michael Foord; :issue:`8074`.)
 
 :class:`TestResult` has new :meth:`startTestRun` and
-:meth:`stopTestRun` methods; called immediately before
-and after a test run. :issue:`5728` by Robert Collins.
+:meth:`stopTestRun` methods that are called immediately before
+and after a test run.  (Contributed by Robert Collins; :issue:`5728`.)
 
 With all these changes, the :file:`unittest.py` was becoming awkwardly
 large, so the module was turned into a package and the code split into


More information about the Python-checkins mailing list