diff options
| author | jvoisin | 2011-11-07 11:23:20 +0100 |
|---|---|---|
| committer | jvoisin | 2011-11-07 11:23:20 +0100 |
| commit | abb7a0154e593f6b2263c0a641b6b0d104cbc2a4 (patch) | |
| tree | 45e562da7a4b737f4c213d8efc4e415bde17d38d /test | |
| parent | bca606fc7e04cb7bb87c2f1b400065c4366c30c2 (diff) | |
Better modularity
Diffstat (limited to 'test')
| -rw-r--r-- | test/test.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/test.py b/test/test.py index 8c96e8d..5c1d9fd 100644 --- a/test/test.py +++ b/test/test.py | |||
| @@ -10,6 +10,7 @@ import os | |||
| 10 | import glob | 10 | import glob |
| 11 | import tempfile | 11 | import tempfile |
| 12 | import unittest | 12 | import unittest |
| 13 | import subprocess | ||
| 13 | 14 | ||
| 14 | VERBOSITY = 3 | 15 | VERBOSITY = 3 |
| 15 | 16 | ||
| @@ -20,12 +21,23 @@ dirty.sort() | |||
| 20 | 21 | ||
| 21 | FILE_LIST = zip(clean, dirty) | 22 | FILE_LIST = zip(clean, dirty) |
| 22 | 23 | ||
| 23 | try: | 24 | try: # pdf render processing |
| 24 | import poppler | 25 | import poppler |
| 25 | import cairo | 26 | import cairo |
| 26 | except: | 27 | except: |
| 27 | FILE_LIST.remove((('clean.pdf'), ('dirty.pdf'))) | 28 | FILE_LIST.remove((('clean.pdf'), ('dirty.pdf'))) |
| 28 | 29 | ||
| 30 | try: # python-mutagen : audio file format | ||
| 31 | import mutagen | ||
| 32 | except: | ||
| 33 | FILE_LIST.remove(('clean.mp3'), ('dirty.mp3')) | ||
| 34 | FILE_LIST.remove(('clean.ogg'), ('dirty.ogg')) | ||
| 35 | |||
| 36 | try: # file format managed by exiftool | ||
| 37 | subprocess.Popen('exiftool', stdout=open('/dev/null')) | ||
| 38 | except: | ||
| 39 | pass # None for now | ||
| 40 | |||
| 29 | 41 | ||
| 30 | class MATTest(unittest.TestCase): | 42 | class MATTest(unittest.TestCase): |
| 31 | ''' | 43 | ''' |
