Skip to content

Commit 4d372ed

Browse files
Catch deprecation warning in test
1 parent f2ec90f commit 4d372ed

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/test_value.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ def test_CommentValue(self):
207207
return
208208
value = exiv2.CommentValue()
209209
# read some invalid data (odd length UTF-16)
210-
value.read(data[:-1])
210+
with self.assertWarns(DeprecationWarning):
211+
value.read(data[:-1])
211212
with self.assertRaises(exiv2.Exiv2Error) as cm:
212213
str(value)
213214
self.assertEqual(cm.exception.code,

0 commit comments

Comments
 (0)