diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2009-01-28 20:26:32 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2009-01-28 20:26:32 +0100 |
commit | 926a9db178e8d62b4bb15940c5df80d8814c4d11 (patch) | |
tree | 55c7ddaa75f008d43d7ee96588e0d00cbc8a8f10 | |
parent | 50e0bbb87603ff2c027011a1ffb6143a9ca4f032 (diff) | |
download | pyexiv2-926a9db178e8d62b4bb15940c5df80d8814c4d11.tar.gz |
Added some unit tests to the XMP date conversion.
-rw-r--r-- | unittest/xmp.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/unittest/xmp.py b/unittest/xmp.py index ef13bbe..8aaa523 100644 --- a/unittest/xmp.py +++ b/unittest/xmp.py @@ -99,6 +99,11 @@ class TestXmpTag(unittest.TestCase): # Invalid values self.failUnlessRaises(XmpValueError, XmpTag._convert_to_python, 'invalid', xtype) self.failUnlessRaises(XmpValueError, XmpTag._convert_to_python, '11/10/1983', xtype) + self.failUnlessRaises(XmpValueError, XmpTag._convert_to_python, '-1000', xtype) + self.failUnlessRaises(XmpValueError, XmpTag._convert_to_python, '2009-13', xtype) + self.failUnlessRaises(XmpValueError, XmpTag._convert_to_python, '2009-10-32', xtype) + self.failUnlessRaises(XmpValueError, XmpTag._convert_to_python, '2009-10-30T25:12Z', xtype) + self.failUnlessRaises(XmpValueError, XmpTag._convert_to_python, '2009-10-30T23:67Z', xtype) # FIXME: the following test should not fail: having hours without minutes is not a valid syntax. self.failUnlessRaises(XmpValueError, XmpTag._convert_to_python, '2009-01-22T21', xtype) |