mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	bpo-41620: TestCase.run() now always return a TestResult instance (GH-28030)
Previously it returned None if the test class or method was decorated with a skipping decorator. Co-authored-by: Iman Tabrizian <iman.tabrizian@gmail.com>
This commit is contained in:
		
							parent
							
								
									d6cb5dd9e1
								
							
						
					
					
						commit
						7e246a3a7b
					
				
					 3 changed files with 34 additions and 24 deletions
				
			
		|  | @ -575,7 +575,7 @@ def run(self, result=None): | |||
|                 skip_why = (getattr(self.__class__, '__unittest_skip_why__', '') | ||||
|                             or getattr(testMethod, '__unittest_skip_why__', '')) | ||||
|                 self._addSkip(result, self, skip_why) | ||||
|                 return | ||||
|                 return result | ||||
| 
 | ||||
|             expecting_failure = ( | ||||
|                 getattr(self, "__unittest_expecting_failure__", False) or | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Serhiy Storchaka
						Serhiy Storchaka