Commit 0550fd186764bb7fd98e8a1ce1c51f95598a5269
1 parent
2127af03
Add sample name to unittest fail message.
Should help debugging unexpected results.
Showing
1 changed file
with
6 additions
and
2 deletions
tests/oleid/test_basic.py
| @@ -77,10 +77,14 @@ class TestOleIDBasic(unittest.TestCase): | @@ -77,10 +77,14 @@ class TestOleIDBasic(unittest.TestCase): | ||
| 77 | continue | 77 | continue |
| 78 | else: | 78 | else: |
| 79 | self.assertEqual(value_dict['codepage'], | 79 | self.assertEqual(value_dict['codepage'], |
| 80 | - '1252: ANSI Latin 1; Western European (Windows)') | 80 | + '1252: ANSI Latin 1; Western European (Windows)', |
| 81 | + 'Unexpected result {0!r} for codepage of sample {1}' | ||
| 82 | + .format(value_dict['codepage'], filename)) | ||
| 81 | self.assertIn(value_dict['author'], | 83 | self.assertIn(value_dict['author'], |
| 82 | (b'user', b'schulung', | 84 | (b'user', b'schulung', |
| 83 | - b'xxxxxxxxxxxx', b'zzzzzzzzzzzz')) | 85 | + b'xxxxxxxxxxxx', b'zzzzzzzzzzzz'), |
| 86 | + 'Unexpected result {0!r} for author of sample {1}' | ||
| 87 | + .format(value_dict['author'], filename)) | ||
| 84 | 88 | ||
| 85 | def test_encrypted(self): | 89 | def test_encrypted(self): |
| 86 | """Test indicator "encrypted".""" | 90 | """Test indicator "encrypted".""" |