From e8f3ae69fc7e40fffdb8f755702eb11f86383e37 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 13 Dec 2012 21:58:05 +0100 Subject: Enhance the way test.py reports failed tests --- test/test.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'test/test.py') diff --git a/test/test.py b/test/test.py index f09e1c5..de6048c 100644 --- a/test/test.py +++ b/test/test.py @@ -15,6 +15,7 @@ import tempfile import unittest import subprocess import sys +import test VERBOSITY = 3 @@ -72,14 +73,12 @@ def main(): import clitest import libtest - failed_tests = 0 + Suite = unittest.TestSuite() + Suite.addTests(clitest.get_tests()) + Suite.addTests(libtest.get_tests()) + + unittest.TextTestRunner(verbosity=test.VERBOSITY).run(Suite) - print('Running cli related tests:\n') - failed_tests += clitest.main() - print('\nRunning library related tests:\n') - failed_tests += libtest.main() - print('\nTotal failed tests: ' + str(failed_tests)) - return failed_tests if __name__ == '__main__': sys.exit(main()) -- cgit v1.3