]> granicus.if.org Git - python/commitdiff
forgot to document that setUp can be skipped (silly me...)
authorBenjamin Peterson <benjamin@python.org>
Mon, 23 Mar 2009 23:13:36 +0000 (23:13 +0000)
committerBenjamin Peterson <benjamin@python.org>
Mon, 23 Mar 2009 23:13:36 +0000 (23:13 +0000)
Doc/library/unittest.rst

index a52677d5bbf54907f64368d5311cf3e6bc156cbf..df03af7ae5d81bc7c2be2874b883665ba1f901ad 100644 (file)
@@ -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()