summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-03-26 20:05:50 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-03-26 20:05:50 (GMT)
commit47d9738b0fb7b1a255ee33c2570caad4469c8469 (patch)
tree1d419a74be93d4d92dddb89fde7a3d1b968af687
parentc3141a6e9607f41ad32ebb0002d009a3728be4fc (diff)
downloadcpython-47d9738b0fb7b1a255ee33c2570caad4469c8469.zip
cpython-47d9738b0fb7b1a255ee33c2570caad4469c8469.tar.gz
cpython-47d9738b0fb7b1a255ee33c2570caad4469c8469.tar.bz2
rename TestCase.skip() to skipTest() because it causes annoying problems with trial #5571
-rw-r--r--Doc/library/unittest.rst2
-rw-r--r--Lib/test/test_unittest.py4
-rw-r--r--Lib/unittest.py2
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)