mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Re-use run_cli for running the build tests
This commit is contained in:
parent
79341ea606
commit
b9c1dbb33f
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user