mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	 c735d54534
			
		
	
	
		c735d54534
		
			
		
	
	
	
	
		
			
			* Move Lib/unittest/test/ to Lib/test/test_unittest/ * Remove Lib/test/test_unittest.py * Replace unittest.test with test.test_unittest * Remove unittest.load_tests() * Rewrite unittest __init__.py and __main__.py * Update build system, CODEOWNERS, and wasm_assets.py
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			470 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			470 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import os
 | |
| import sys
 | |
| import unittest
 | |
| 
 | |
| 
 | |
| here = os.path.dirname(__file__)
 | |
| loader = unittest.defaultTestLoader
 | |
| 
 | |
| def load_tests(*args):
 | |
|     suite = unittest.TestSuite()
 | |
|     for fn in os.listdir(here):
 | |
|         if fn.startswith("test") and fn.endswith(".py"):
 | |
|             modname = "test.test_unittest.testmock." + fn[:-3]
 | |
|             __import__(modname)
 | |
|             module = sys.modules[modname]
 | |
|             suite.addTest(loader.loadTestsFromModule(module))
 | |
|     return suite
 |