mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	Temporary fix: Module names are still 8bit strings. This
change allows test_support.run_unittest(__name__) to work again. However the proper fix would be module names that are real unicode strings.
This commit is contained in:
		
							parent
							
								
									aa97f04964
								
							
						
					
					
						commit
						bae5cedb8d
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -534,7 +534,7 @@ def run_unittest(*classes):
 | 
				
			||||||
    valid_types = (unittest.TestSuite, unittest.TestCase)
 | 
					    valid_types = (unittest.TestSuite, unittest.TestCase)
 | 
				
			||||||
    suite = unittest.TestSuite()
 | 
					    suite = unittest.TestSuite()
 | 
				
			||||||
    for cls in classes:
 | 
					    for cls in classes:
 | 
				
			||||||
        if isinstance(cls, str):
 | 
					        if isinstance(cls, (str, str8)):
 | 
				
			||||||
            if cls in sys.modules:
 | 
					            if cls in sys.modules:
 | 
				
			||||||
                suite.addTest(unittest.findTestCases(sys.modules[cls]))
 | 
					                suite.addTest(unittest.findTestCases(sys.modules[cls]))
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue