Kaydet (Commit) 31b7806e authored tarafından Benjamin Peterson's avatar Benjamin Peterson

forgot to document that setUp can be skipped (silly me...)

üst 99721e0c
...@@ -455,6 +455,9 @@ Classes can be skipped just like methods: :: ...@@ -455,6 +455,9 @@ Classes can be skipped just like methods: ::
def test_not_run(self): def test_not_run(self):
pass 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. :: Expected failures use the :func:`expectedFailure` decorator. ::
class ExpectedFailureTestCase(unittest.TestCase): class ExpectedFailureTestCase(unittest.TestCase):
...@@ -569,8 +572,8 @@ Test cases ...@@ -569,8 +572,8 @@ Test cases
.. method:: skip(reason) .. method:: skip(reason)
Skips the current test. See :ref:`unittest-skipping` for more Calling this during the a test method or :meth:`setUp` skips the current
information. test. See :ref:`unittest-skipping` for more information.
.. method:: debug() .. method:: debug()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment