Re-use run_cli for running the build tests

This commit is contained in:
Kovid Goyal 2016-07-03 11:30:39 +05:30
parent 79341ea606
commit b9c1dbb33f

View File

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