aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2009-01-28 20:26:32 +0100
committerOlivier Tilloy <olivier@tilloy.net>2009-01-28 20:26:32 +0100
commit926a9db178e8d62b4bb15940c5df80d8814c4d11 (patch)
tree55c7ddaa75f008d43d7ee96588e0d00cbc8a8f10
parent50e0bbb87603ff2c027011a1ffb6143a9ca4f032 (diff)
downloadpyexiv2-926a9db178e8d62b4bb15940c5df80d8814c4d11.tar.gz
Added some unit tests to the XMP date conversion.
-rw-r--r--unittest/xmp.py5
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)