summaryrefslogtreecommitdiff
path: root/test/test.py
diff options
context:
space:
mode:
authorjvoisin2012-12-13 21:58:05 +0100
committerjvoisin2012-12-13 21:58:05 +0100
commite8f3ae69fc7e40fffdb8f755702eb11f86383e37 (patch)
tree613f1c927ec528abefc4e6395e04d9ab074c82a5 /test/test.py
parentcbf8a2a65928694202e19b6bcf56ec84bcbf613c (diff)
Enhance the way test.py reports failed tests
Diffstat (limited to 'test/test.py')
-rw-r--r--test/test.py13
1 files changed, 6 insertions, 7 deletions
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
15import unittest 15import unittest
16import subprocess 16import subprocess
17import sys 17import sys
18import test
18 19
19VERBOSITY = 3 20VERBOSITY = 3
20 21
@@ -72,14 +73,12 @@ def main():
72 import clitest 73 import clitest
73 import libtest 74 import libtest
74 75
75 failed_tests = 0 76 Suite = unittest.TestSuite()
77 Suite.addTests(clitest.get_tests())
78 Suite.addTests(libtest.get_tests())
79
80 unittest.TextTestRunner(verbosity=test.VERBOSITY).run(Suite)
76 81
77 print('Running cli related tests:\n')
78 failed_tests += clitest.main()
79 print('\nRunning library related tests:\n')
80 failed_tests += libtest.main()
81 print('\nTotal failed tests: ' + str(failed_tests))
82 return failed_tests
83 82
84if __name__ == '__main__': 83if __name__ == '__main__':
85 sys.exit(main()) 84 sys.exit(main())