mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	 ef04c44e29
			
		
	
	
		ef04c44e29
		
	
	
	
	
		
			
			svn+ssh://pythondev@svn.python.org/python/trunk ........ r61596 | martin.v.loewis | 2008-03-18 23:43:46 -0500 (Di, 18 Mär 2008) | 2 lines Import lib2to3. ........ r61597 | martin.v.loewis | 2008-03-18 23:58:04 -0500 (Di, 18 Mär 2008) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-61595" from svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........
		
			
				
	
	
		
			24 lines
		
	
	
	
		
			673 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
	
		
			673 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| """Make tests/ into a package. This allows us to "import tests" and
 | |
| have tests.all_tests be a TestSuite representing all test cases
 | |
| from all test_*.py files in tests/."""
 | |
| # Author: Collin Winter
 | |
| 
 | |
| import os
 | |
| import os.path
 | |
| import unittest
 | |
| import types
 | |
| 
 | |
| from . import support
 | |
| 
 | |
| all_tests = unittest.TestSuite()
 | |
| 
 | |
| tests_dir = os.path.join(os.path.dirname(__file__), '..', 'tests')
 | |
| tests = [t[0:-3] for t in os.listdir(tests_dir)
 | |
|                         if t.startswith('test_') and t.endswith('.py')]
 | |
| 
 | |
| loader = unittest.TestLoader()
 | |
| 
 | |
| for t in tests:
 | |
|     __import__("",globals(),locals(),[t],level=1)
 | |
|     mod = globals()[t]
 | |
|     all_tests.addTests(loader.loadTestsFromModule(mod))
 |