summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-03-23 23:13:36 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-03-23 23:13:36 (GMT)
commit31b7806ee808ee750cddd737c8c61ee18afaeee9 (patch)
tree94ffc6ed517fc7f486c502635cafdf801be79680
parent99721e0c44f28895f62af33850a7de974542c3bd (diff)
downloadcpython-31b7806ee808ee750cddd737c8c61ee18afaeee9.zip
cpython-31b7806ee808ee750cddd737c8c61ee18afaeee9.tar.gz
cpython-31b7806ee808ee750cddd737c8c61ee18afaeee9.tar.bz2
forgot to document that setUp can be skipped (silly me...)
-rw-r--r--Doc/library/unittest.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index a52677d..df03af7 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -455,6 +455,9 @@ Classes can be skipped just like methods: ::
def test_not_run(self):
pass
+:meth:`TestCase.setUp` can also skip the test. This is useful when a resource
+that needs to be set up is not available.
+
Expected failures use the :func:`expectedFailure` decorator. ::
class ExpectedFailureTestCase(unittest.TestCase):
@@ -569,8 +572,8 @@ Test cases
.. method:: skip(reason)
- Skips the current test. See :ref:`unittest-skipping` for more
- information.
+ Calling this during the a test method or :meth:`setUp` skips the current
+ test. See :ref:`unittest-skipping` for more information.
.. method:: debug()