mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
Addes tests
This commit is contained in:
parent
9318755a18
commit
92b070ceaf
|
@ -37,6 +37,18 @@ class TestFileBmp(PillowTestCase):
|
||||||
self.assertEqual(im.size, reloaded.size)
|
self.assertEqual(im.size, reloaded.size)
|
||||||
self.assertEqual(reloaded.format, "BMP")
|
self.assertEqual(reloaded.format, "BMP")
|
||||||
|
|
||||||
|
def test_dpi(self):
|
||||||
|
dpi = (72, 72)
|
||||||
|
|
||||||
|
output = io.BytesIO()
|
||||||
|
im = lena()
|
||||||
|
im.save(output, "BMP", dpi=dpi)
|
||||||
|
|
||||||
|
output.seek(0)
|
||||||
|
reloaded = Image.open(output)
|
||||||
|
|
||||||
|
self.assertEqual(reloaded.info["dpi"], dpi)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user