2 import unittest
, os
, sys
3 for x
in ['LANGUAGE', 'LANG']:
8 coverage
.use_cache(False)
14 my_dir
= os
.path
.dirname(sys
.argv
[0])
19 testLoader
= unittest
.TestLoader()
20 alltests
= testLoader
.loadTestsFromNames(sys
.argv
[1:])
22 suite_names
= [f
[:-3] for f
in os
.listdir(my_dir
)
23 if f
.startswith('test') and f
.endswith('.py')]
24 suite_names
.remove('testall')
27 alltests
= unittest
.TestSuite()
29 for name
in suite_names
:
30 m
= __import__(name
, globals(), locals(), [])
31 alltests
.addTest(m
.suite
)
33 a
= unittest
.TextTestRunner(verbosity
=2).run(alltests
)
38 print "Coverage module not found. Skipping coverage report."
41 if not a
.wasSuccessful():
47 for x
in os
.listdir(d
):
49 all_sources
.append(os
.path
.join(d
, x
))
51 coverage
.report(all_sources
+ ['../0publish'])