Commit 7fedfd1d10ebbcc77767267f37c7e1b9b08f6c0b
Committed by
Philippe Lagadec
1 parent
b89910b5
unittest: make compatible with python 2.6, improve output
Showing
1 changed file
with
3 additions
and
1 deletions
tests/ooxml/test_basic.py
| ... | ... | @@ -35,7 +35,9 @@ class TestOOXML(unittest.TestCase): |
| 35 | 35 | doctype = ooxml.get_type(full_name) |
| 36 | 36 | except Exception: |
| 37 | 37 | self.fail('Failed to get doctype of {0}'.format(filename)) |
| 38 | - self.assertIn(doctype, acceptable) | |
| 38 | + self.assertTrue(doctype in acceptable, | |
| 39 | + msg='Doctype "{0}" for {1} not acceptable' | |
| 40 | + .format(doctype, full_name)) | |
| 39 | 41 | #print('ok: ' + filename + doctype) |
| 40 | 42 | |
| 41 | 43 | ... | ... |