File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,9 +169,13 @@ def test_MemIo(self):
169169 exiv2 .ErrorCode .kerCorruptedMetadata )
170170 else :
171171 with self .assertWarns (DeprecationWarning ):
172- self .assertEqual (
173- io .seek (len (self .data ) + 10 , exiv2 .BasicIo .Position .beg ),
174- exiv2 .ErrorCode .kerErrorMessage )
172+ if exiv2 .testVersion (0 , 27 , 2 ):
173+ self .assertEqual (io .seek (len (self .data ) + 10 ,
174+ exiv2 .BasicIo .Position .beg ),
175+ exiv2 .ErrorCode .kerErrorMessage )
176+ else :
177+ self .assertEqual (io .seek (len (self .data ) + 10 ,
178+ exiv2 .BasicIo .Position .beg ), 0 )
175179 with self .assertWarns (DeprecationWarning ):
176180 self .assertEqual (io .seek (0 , exiv2 .BasicIo .Position .end ), 0 )
177181 with self .assertWarns (DeprecationWarning ):
Original file line number Diff line number Diff line change @@ -58,8 +58,12 @@ def test_LogMsg(self):
5858 # get exiv2 to raise an exception
5959 with self .assertRaises (exiv2 .Exiv2Error ) as cm :
6060 image = exiv2 .ImageFactory .open (bytes ())
61- self .assertEqual (cm .exception .code ,
62- exiv2 .ErrorCode .kerInputDataReadFailed )
61+ if exiv2 .testVersion (0 , 27 , 1 ):
62+ self .assertEqual (cm .exception .code ,
63+ exiv2 .ErrorCode .kerInputDataReadFailed )
64+ else :
65+ self .assertEqual (cm .exception .code ,
66+ exiv2 .ErrorCode .kerMemoryContainsUnknownImageType )
6367
6468
6569if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments