mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	This is partly a cleanup of the code. It also is preparation for getting the variables from the source (cross-platform) rather than from the symbols. The change only touches the tool (and its tests).
		
			
				
	
	
		
			24 lines
		
	
	
	
		
			749 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
	
		
			749 B
		
	
	
	
		
			Python
		
	
	
	
	
	
import unittest
 | 
						|
import test.test_tools
 | 
						|
 | 
						|
test.test_tools.skip_if_missing('c-analyzer')
 | 
						|
with test.test_tools.imports_under_tool('c-analyzer'):
 | 
						|
    from cpython.__main__ import main
 | 
						|
 | 
						|
 | 
						|
class ActualChecks(unittest.TestCase):
 | 
						|
 | 
						|
    # XXX Also run the check in "make check".
 | 
						|
    #@unittest.expectedFailure
 | 
						|
    # Failing on one of the buildbots (see https://bugs.python.org/issue36876).
 | 
						|
    @unittest.skip('activate this once all the globals have been resolved')
 | 
						|
    def test_check_c_globals(self):
 | 
						|
        try:
 | 
						|
            main('check', {})
 | 
						|
        except NotImplementedError:
 | 
						|
            raise unittest.SkipTest('not supported on this host')
 | 
						|
 | 
						|
 | 
						|
if __name__ == '__main__':
 | 
						|
    # Test needs to be a package, so we can do relative imports.
 | 
						|
    unittest.main()
 |