summaryrefslogtreecommitdiff
path: root/test/test.py
diff options
context:
space:
mode:
authorjvoisin2012-12-13 22:10:59 +0100
committerjvoisin2012-12-13 22:10:59 +0100
commitd937b7e865490a80c2bff0ca161288f323313c1b (patch)
treeca3355f3ee91c5fa4266f0236e38706a2acfbe67 /test/test.py
parente8f3ae69fc7e40fffdb8f755702eb11f86383e37 (diff)
Specify exceptions types
Diffstat (limited to 'test/test.py')
-rw-r--r--test/test.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/test/test.py b/test/test.py
index de6048c..cbee609 100644
--- a/test/test.py
+++ b/test/test.py
@@ -15,7 +15,6 @@ import tempfile
15import unittest 15import unittest
16import subprocess 16import subprocess
17import sys 17import sys
18import test
19 18
20VERBOSITY = 3 19VERBOSITY = 3
21 20
@@ -30,18 +29,18 @@ try: # PDF render processing
30 import poppler 29 import poppler
31 import cairo 30 import cairo
32 import pdfrw 31 import pdfrw
33except: 32except ImportError:
34 FILE_LIST.remove(('clean é.pdf', 'dirty é.pdf')) 33 FILE_LIST.remove(('clean é.pdf', 'dirty é.pdf'))
35 34
36try: # python-mutagen : audio file format 35try: # python-mutagen : audio file format
37 import mutagen 36 import mutagen
38except: 37except ImportError:
39 pass # since wr don't have any ogg for now 38 pass # since wr don't have any ogg for now
40 #FILE_LIST.remove(('clean.ogg', 'dirty.ogg')) 39 #FILE_LIST.remove(('clean.ogg', 'dirty.ogg'))
41 40
42try: # file format exclusively managed by exiftool 41try: # file format exclusively managed by exiftool
43 subprocess.Popen('exiftool', stdout=open('/dev/null')) 42 subprocess.Popen('exiftool', stdout=open('/dev/null'))
44except: 43except OSError:
45 pass # None for now 44 pass # None for now
46 45
47 46
@@ -73,11 +72,11 @@ def main():
73 import clitest 72 import clitest
74 import libtest 73 import libtest
75 74
76 Suite = unittest.TestSuite() 75 suite = unittest.TestSuite()
77 Suite.addTests(clitest.get_tests()) 76 suite.addTests(clitest.get_tests())
78 Suite.addTests(libtest.get_tests()) 77 suite.addTests(libtest.get_tests())
79 78
80 unittest.TextTestRunner(verbosity=test.VERBOSITY).run(Suite) 79 unittest.TextTestRunner(verbosity=VERBOSITY).run(suite)
81 80
82 81
83if __name__ == '__main__': 82if __name__ == '__main__':