Re-use run_cli for running the build tests

This commit is contained in:
Kovid Goyal 2016-07-03 11:30:39 +05:30 committed by David
parent 0cc5371090
commit c7365b9333

View File

@ -237,15 +237,9 @@ def find_tests():
ans.addTests(find_tests()) ans.addTests(find_tests())
return ans return ans
class TestRunner(unittest.main):
def createTests(self):
self.test = find_tests()
def test(): def test():
result = TestRunner(verbosity=2, buffer=True, catchbreak=True, failfast=False, argv=sys.argv[:1], exit=False).result from calibre.utils.run_tests import run_cli
if not result.wasSuccessful(): run_cli(find_tests())
raise SystemExit(1)
if __name__ == '__main__': if __name__ == '__main__':
test() test()