Skip to content

Commit

Permalink
Add test of Xmpdatum::copy
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-easterbrook committed Jan 13, 2024
1 parent f346108 commit d82701c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_xmp.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## python-exiv2 - Python interface to libexiv2
## http://github.com/jim-easterbrook/python-exiv2
## Copyright (C) 2023 Jim Easterbrook [email protected]
## Copyright (C) 2023-24 Jim Easterbrook [email protected]
##
## This program is free software: you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
Expand Down Expand Up @@ -120,6 +120,9 @@ def test_XmpData(self):

def _test_datum(self, datum):
self.assertIsInstance(str(datum), str)
buf = bytearray(datum.size())
with self.assertRaises(exiv2.Exiv2Error):
datum.copy(buf, exiv2.ByteOrder.littleEndian)
self.assertEqual(datum.count(), 3)
self.assertEqual(datum.familyName(), 'Xmp')
self.assertIsInstance(datum.getValue(), exiv2.LangAltValue)
Expand Down

0 comments on commit d82701c

Please sign in to comment.