summaryrefslogtreecommitdiff
path: root/test/test.py
diff options
context:
space:
mode:
authorjvoisin2012-12-13 22:40:31 +0100
committerjvoisin2012-12-13 22:40:31 +0100
commitffcb08763dcdaeef0caabc3fcb4d1442fce404ef (patch)
tree2e8057e8e59e99df1a4f6bbf6ae0e1d0b8f837f6 /test/test.py
parent614b07d5166a1718ac4d492384490d33c4087f49 (diff)
parentdae41c8e7d2cfce4e7f6a6a2bd27e0c018cd6a60 (diff)
Merge branch 'test_suite'
Diffstat (limited to 'test/test.py')
-rw-r--r--test/test.py23
1 files changed, 8 insertions, 15 deletions
diff --git a/test/test.py b/test/test.py
index f09e1c5..675c4f9 100644
--- a/test/test.py
+++ b/test/test.py
@@ -14,7 +14,6 @@ import glob
14import tempfile 14import tempfile
15import unittest 15import unittest
16import subprocess 16import subprocess
17import sys
18 17
19VERBOSITY = 3 18VERBOSITY = 3
20 19
@@ -29,18 +28,18 @@ try: # PDF render processing
29 import poppler 28 import poppler
30 import cairo 29 import cairo
31 import pdfrw 30 import pdfrw
32except: 31except ImportError:
33 FILE_LIST.remove(('clean é.pdf', 'dirty é.pdf')) 32 FILE_LIST.remove(('clean é.pdf', 'dirty é.pdf'))
34 33
35try: # python-mutagen : audio file format 34try: # python-mutagen : audio file format
36 import mutagen 35 import mutagen
37except: 36except ImportError:
38 pass # since wr don't have any ogg for now 37 pass # since wr don't have any ogg for now
39 #FILE_LIST.remove(('clean.ogg', 'dirty.ogg')) 38 #FILE_LIST.remove(('clean.ogg', 'dirty.ogg'))
40 39
41try: # file format exclusively managed by exiftool 40try: # file format exclusively managed by exiftool
42 subprocess.Popen('exiftool', stdout=open('/dev/null')) 41 subprocess.Popen('exiftool', stdout=open('/dev/null'))
43except: 42except OSError:
44 pass # None for now 43 pass # None for now
45 44
46 45
@@ -68,18 +67,12 @@ class MATTest(unittest.TestCase):
68 shutil.rmtree(self.tmpdir) 67 shutil.rmtree(self.tmpdir)
69 68
70 69
71def main(): 70if __name__ == '__main__':
72 import clitest 71 import clitest
73 import libtest 72 import libtest
74 73
75 failed_tests = 0 74 SUITE = unittest.TestSuite()
76 75 SUITE.addTests(clitest.get_tests())
77 print('Running cli related tests:\n') 76 SUITE.addTests(libtest.get_tests())
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 77
84if __name__ == '__main__': 78 unittest.TextTestRunner(verbosity=VERBOSITY).run(SUITE)
85 sys.exit(main())