diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2011-08-04 09:10:46 +0200 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2011-08-04 09:10:46 +0200 |
commit | 234dbc462b15365e8909bffadf54b05649e77f3f (patch) | |
tree | 92a0c37460c2b141dc07025da175e30611f189cc /test/exif.py | |
parent | 5d6fc27aa0dee1d9793b027a1215cc4c124cc7c9 (diff) | |
download | pyexiv2-234dbc462b15365e8909bffadf54b05649e77f3f.tar.gz |
Added some (failing) unit tests for date conversion for dates prior to year 1900.
Diffstat (limited to 'test/exif.py')
-rw-r--r-- | test/exif.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/exif.py b/test/exif.py index 38e19b7..10646db 100644 --- a/test/exif.py +++ b/test/exif.py @@ -79,12 +79,18 @@ class TestExifTag(unittest.TestCase): '2009:03:01 12:54:28') self.assertEqual(tag._convert_to_string(datetime.date(2009, 03, 01)), '2009:03:01 00:00:00') + self.assertEqual(tag._convert_to_string(datetime.datetime(1899, 12, 31, 23, 59, 29)), + '1899:12:31 23:59:59') + self.assertEqual(tag._convert_to_string(datetime.date(1899, 12, 31)), + '1899:12:31 00:00:00') # Valid values: dates tag = ExifTag('Exif.GPSInfo.GPSDateStamp') self.assertEqual(tag.type, 'Ascii') self.assertEqual(tag._convert_to_string(datetime.date(2009, 03, 01)), '2009:03:01') + self.assertEqual(tag._convert_to_string(datetime.date(1899, 12, 31)), + '1899:12:31') # Valid values: strings tag = ExifTag('Exif.Image.Copyright') |