From: Benjamin Peterson Date: Thu, 26 Mar 2009 20:05:50 +0000 (+0000) Subject: rename TestCase.skip() to skipTest() because it causes annoying problems with trial... X-Git-Tag: v2.7a1~1787 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47d9738b0fb7b1a255ee33c2570caad4469c8469;p=thirdparty%2FPython%2Fcpython.git rename TestCase.skip() to skipTest() because it causes annoying problems with trial #5571 --- diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index f437c8d1b73d..4f321dc35723 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 cd8f9670da77..b0b86be8649d 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 a55a7d848e63..10b68ed6fdc9 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)