mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	rename TestCase.skip() to skipTest() because it causes annoying problems with trial #5571
This commit is contained in:
		
							parent
							
								
									c3141a6e96
								
							
						
					
					
						commit
						47d9738b0f
					
				
					 3 changed files with 4 additions and 4 deletions
				
			
		|  | @ -576,7 +576,7 @@ Test cases | ||||||
|       instance. |       instance. | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|    .. method:: skip(reason) |    .. method:: skipTest(reason) | ||||||
| 
 | 
 | ||||||
|       Calling this during the a test method or :meth:`setUp` skips the current |       Calling this during the a test method or :meth:`setUp` skips the current | ||||||
|       test.  See :ref:`unittest-skipping` for more information. |       test.  See :ref:`unittest-skipping` for more information. | ||||||
|  |  | ||||||
|  | @ -2294,7 +2294,7 @@ class Test_TestSkipping(TestCase): | ||||||
|     def test_skipping(self): |     def test_skipping(self): | ||||||
|         class Foo(unittest.TestCase): |         class Foo(unittest.TestCase): | ||||||
|             def test_skip_me(self): |             def test_skip_me(self): | ||||||
|                 self.skip("skip") |                 self.skipTest("skip") | ||||||
|         events = [] |         events = [] | ||||||
|         result = LoggingResult(events) |         result = LoggingResult(events) | ||||||
|         test = Foo("test_skip_me") |         test = Foo("test_skip_me") | ||||||
|  | @ -2305,7 +2305,7 @@ def test_skip_me(self): | ||||||
|         # Try letting setUp skip the test now. |         # Try letting setUp skip the test now. | ||||||
|         class Foo(unittest.TestCase): |         class Foo(unittest.TestCase): | ||||||
|             def setUp(self): |             def setUp(self): | ||||||
|                 self.skip("testing") |                 self.skipTest("testing") | ||||||
|             def test_nothing(self): pass |             def test_nothing(self): pass | ||||||
|         events = [] |         events = [] | ||||||
|         result = LoggingResult(events) |         result = LoggingResult(events) | ||||||
|  |  | ||||||
|  | @ -411,7 +411,7 @@ def debug(self): | ||||||
|         getattr(self, self._testMethodName)() |         getattr(self, self._testMethodName)() | ||||||
|         self.tearDown() |         self.tearDown() | ||||||
| 
 | 
 | ||||||
|     def skip(self, reason): |     def skipTest(self, reason): | ||||||
|         """Skip this test.""" |         """Skip this test.""" | ||||||
|         raise SkipTest(reason) |         raise SkipTest(reason) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Benjamin Peterson
						Benjamin Peterson