]> granicus.if.org Git - python/commitdiff
rename TestCase.skip() to skipTest() because it causes annoying problems with trial...
authorBenjamin Peterson <benjamin@python.org>
Thu, 26 Mar 2009 20:05:50 +0000 (20:05 +0000)
committerBenjamin Peterson <benjamin@python.org>
Thu, 26 Mar 2009 20:05:50 +0000 (20:05 +0000)
Doc/library/unittest.rst
Lib/test/test_unittest.py
Lib/unittest.py

index f437c8d1b73dc3d01200061c74c403b3746fe2a7..4f321dc357239366c0f027852b983ce97c60e1a1 100644 (file)
@@ -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.
index cd8f9670da77e75d0cf9acfb34c7b34659a29f19..b0b86be8649d6ba60081b15677798a9a32a28990 100644 (file)
@@ -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)
index a55a7d848e639c528d503e6bac8a75eb833cc359..10b68ed6fdc99e9098f1d63735f460a9f62e0da5 100644 (file)
@@ -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)