Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(41085)

Delta Between Two Patch Sets: Lib/test/test_imghdr.py

Issue 19990: Add unittests for imghdr module
Left Patch Set: Created 5 years, 7 months ago
Right Patch Set: Created 5 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/test/imghdrdata/python.xbm ('k') | Lib/test/test_sundry.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(Both sides are equal)
1 import imghdr 1 import imghdr
2 import io 2 import io
3 import unittest 3 import unittest
4 from test.support import findfile, TESTFN, unlink 4 from test.support import findfile, TESTFN, unlink
5 5
6 TEST_FILES = ( 6 TEST_FILES = (
7 ('python.png', 'png'), 7 ('python.png', 'png'),
8 ('python.gif', 'gif'), 8 ('python.gif', 'gif'),
9 ('python.bmp', 'bmp'), 9 ('python.bmp', 'bmp'),
10 ('python.ppm', 'ppm'), 10 ('python.ppm', 'ppm'),
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 (b'', 'bytes'), 104 (b'', 'bytes'),
105 (None, 'NoneType')): 105 (None, 'NoneType')):
106 with self.assertRaises(AttributeError) as cm: 106 with self.assertRaises(AttributeError) as cm:
107 imghdr.what(obj) 107 imghdr.what(obj)
108 self.assertEqual(str(cm.exception), 108 self.assertEqual(str(cm.exception),
109 "{!r} object has no attribute 'tell'" 109 "{!r} object has no attribute 'tell'"
110 .format(type)) 110 .format(type))
111 111
112 if __name__ == '__main__': 112 if __name__ == '__main__':
113 unittest.main() 113 unittest.main()
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+