diff options
-rw-r--r-- | test/metadata.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/metadata.py b/test/metadata.py index 177ec9d..a00d9fa 100644 --- a/test/metadata.py +++ b/test/metadata.py @@ -2,7 +2,7 @@ # ****************************************************************************** # -# Copyright (C) 2009-2010 Olivier Tilloy <olivier@tilloy.net> +# Copyright (C) 2009-2011 Olivier Tilloy <olivier@tilloy.net> # # This file is part of the pyexiv2 distribution. # @@ -564,6 +564,13 @@ class TestImageMetadata(unittest.TestCase): for key in keys: self.metadata[key] = self.metadata[key] + def test_nonexistent_tag_family(self): + self.metadata.read() + key = 'Bleh.Image.DateTime' + self.failUnlessRaises(KeyError, self.metadata.__getitem__, key) + self.failUnlessRaises(KeyError, self.metadata.__setitem__, key, datetime.date.today()) + self.failUnlessRaises(KeyError, self.metadata.__delitem__, key) + ########################## # Test the image comment # ########################## |