summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2014-04-16 03:38:11 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2014-04-16 03:38:11 (GMT)
commite804efa6bb0fc73f4c48e18f3b6a5d1ed38686aa (patch)
tree4f4e38dd297e8e72948016e13c5fa23f97ca450c
parent51f80c12a4a39edfee02efecc1e5fccb960af099 (diff)
downloadcpython-e804efa6bb0fc73f4c48e18f3b6a5d1ed38686aa.zip
cpython-e804efa6bb0fc73f4c48e18f3b6a5d1ed38686aa.tar.gz
cpython-e804efa6bb0fc73f4c48e18f3b6a5d1ed38686aa.tar.bz2
Issue #18566: Clarify unittest setUp, tearDown doc. Patch by Nitika Agarwal.
-rw-r--r--Doc/library/unittest.rst14
-rw-r--r--Misc/ACKS1
2 files changed, 8 insertions, 7 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index 91f61f4..999ae6a 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -719,9 +719,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()
@@ -729,10 +729,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()
diff --git a/Misc/ACKS b/Misc/ACKS
index 5814320..3af3ff4 100644
--- 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