diff options
-rw-r--r-- | Doc/library/unittest.rst | 2 | ||||
-rw-r--r-- | Lib/test/test_unittest.py | 4 | ||||
-rw-r--r-- | Lib/unittest.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index f437c8d..4f321dc 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -576,7 +576,7 @@ Test cases instance. - .. method:: skip(reason) + .. method:: skipTest(reason) Calling this during the a test method or :meth:`setUp` skips the current test. See :ref:`unittest-skipping` for more information. diff --git a/Lib/test/test_unittest.py b/Lib/test/test_unittest.py index cd8f967..b0b86be 100644 --- a/Lib/test/test_unittest.py +++ b/Lib/test/test_unittest.py @@ -2294,7 +2294,7 @@ class Test_TestSkipping(TestCase): def test_skipping(self): class Foo(unittest.TestCase): def test_skip_me(self): - self.skip("skip") + self.skipTest("skip") events = [] result = LoggingResult(events) test = Foo("test_skip_me") @@ -2305,7 +2305,7 @@ class Test_TestSkipping(TestCase): # Try letting setUp skip the test now. class Foo(unittest.TestCase): def setUp(self): - self.skip("testing") + self.skipTest("testing") def test_nothing(self): pass events = [] result = LoggingResult(events) diff --git a/Lib/unittest.py b/Lib/unittest.py index a55a7d8..10b68ed 100644 --- a/Lib/unittest.py +++ b/Lib/unittest.py @@ -411,7 +411,7 @@ class TestCase(object): getattr(self, self._testMethodName)() self.tearDown() - def skip(self, reason): + def skipTest(self, reason): """Skip this test.""" raise SkipTest(reason) |