10 # force untranslated messages, as we check for them in some tests
11 os.environ['LC_MESSAGES'] = 'C'
14 if 'TEST_NAMES' in os.environ:
15 names = os.environ['TEST_NAMES'].split()
16 elif 'TEST_FILES' in os.environ:
18 for filename in os.environ['TEST_FILES'].split():
19 names.append(filename[:-3])
22 for filename in glob.iglob("test_*.py"):
23 names.append(filename[:-3])
25 loader = unittest.TestLoader()
26 suite = loader.loadTestsFromNames(names)
30 runner = unittest.TextTestRunner(verbosity=2)
31 result = runner.run(suite)
32 if not result.wasSuccessful():
33 sys.exit(1) # exit code so "make check" reports error