Skip to content

Commit

Permalink
Merge d12acfe into 8c88a4d
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Feb 8, 2015
2 parents 8c88a4d + d12acfe commit 7ff774c
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions Tests/test_file_tiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,23 @@ def test___str__(self):

# Assert
self.assertIsInstance(ret, str)

def test_as_dict(self):
# Arrange
filename = "Tests/images/pil136.tiff"
im = Image.open(filename)

# Act
ret = im.ifd.as_dict()

# Assert
self.assertIsInstance(ret, dict)

self.assertEqual(
ret,
'{256: (55,), 257: (43,), 258: (8, 8, 8, 8), 259: (1,), '
'262: (2,), 296: (2,), 273: (8,), 338: (1,), 277: (4,), '
'279: (9460,), 282: ((720000, 10000),), '
'283: ((720000, 10000),), 284: (1,)}')
ret, {256: (55,), 257: (43,), 258: (8, 8, 8, 8), 259: (1,),
262: (2,), 296: (2,), 273: (8,), 338: (1,), 277: (4,),
279: (9460,), 282: ((720000, 10000),),
283: ((720000, 10000),), 284: (1,)})

def test__delitem__(self):
# Arrange
Expand Down

0 comments on commit 7ff774c

Please sign in to comment.