1import unittest
2import test.test_tools
3
4test.test_tools.skip_if_missing('c-analyzer')
5with test.test_tools.imports_under_tool('c-analyzer'):
6    from cpython.__main__ import main
7
8
9class ActualChecks(unittest.TestCase):
10
11    # XXX Also run the check in "make check".
12    #@unittest.expectedFailure
13    # Failing on one of the buildbots (see https://bugs.python.org/issue36876).
14    @unittest.skip('activate this once all the globals have been resolved')
15    def test_check_c_globals(self):
16        try:
17            main('check', {})
18        except NotImplementedError:
19            raise unittest.SkipTest('not supported on this host')
20
21
22if __name__ == '__main__':
23    # Test needs to be a package, so we can do relative imports.
24    unittest.main()
25