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 | 77 | continue |
| 78 | 78 | else: |
| 79 | 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 | 83 | self.assertIn(value_dict['author'], |
| 82 | 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 | 89 | def test_encrypted(self): |
| 86 | 90 | """Test indicator "encrypted".""" | ... | ... |