]> granicus.if.org Git - python/commitdiff
Issue #18566: Clarify unittest setUp, tearDown doc. Patch by Nitika Agarwal.
authorTerry Jan Reedy <tjreedy@udel.edu>
Wed, 16 Apr 2014 03:38:18 +0000 (23:38 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Wed, 16 Apr 2014 03:38:18 +0000 (23:38 -0400)
Doc/library/unittest.rst
Misc/ACKS

index fbeaf7f2cd498b31358657a0ef9b165c86a5351b..bc61d3f1b9bf58dcff8906260459251a676625c6 100644 (file)
@@ -674,9 +674,9 @@ Test cases
    .. method:: setUp()
 
       Method called to prepare the test fixture.  This is called immediately
-      before calling the test method; any exception raised by this method will
-      be considered an error rather than a test failure. The default
-      implementation does nothing.
+      before calling the test method; other than :exc:`AssertionError` or :exc:`SkipTest`, 
+      any exception raised by this method will be considered an error rather than 
+      a test failure. The default implementation does nothing.
 
 
    .. method:: tearDown()
@@ -684,10 +684,10 @@ Test cases
       Method called immediately after the test method has been called and the
       result recorded.  This is called even if the test method raised an
       exception, so the implementation in subclasses may need to be particularly
-      careful about checking internal state.  Any exception raised by this
-      method will be considered an error rather than a test failure.  This
-      method will only be called if the :meth:`setUp` succeeds, regardless of
-      the outcome of the test method. The default implementation does nothing.
+      careful about checking internal state.  Any exception, other than :exc:`AssertionError` 
+      or :exc:`SkipTest`, raised by this method will be considered an error rather than a 
+      test failure.  This method will only be called if the :meth:`setUp` succeeds, 
+      regardless of the outcome of the test method. The default implementation does nothing.
 
 
    .. method:: setUpClass()
index a19a68f3722534b4052120a97e898ff2dfc7ca5c..14eabd4280c04da6f71b5b00178519e8536e40e6 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -18,6 +18,7 @@ David Abrahams
 Marc Abramowitz
 Ron Adam
 Ali Afshar
+Nitika Agarwal
 Jim Ahlstrom
 Farhan Ahmad
 Matthew Ahrens