Roundtrip test hotspot

This commit is contained in:
Andrew Murray 2020-01-14 21:10:10 +11:00
parent dbd3c7c9b9
commit f3f9190de7

View File

@ -65,3 +65,13 @@ class TestFileXbm(PillowTestCase):
with self.assertRaises(OSError):
im.save(out)
def test_hotspot(self):
im = hopper("1")
out = self.tempfile("temp.xbm")
hotspot = (0, 7)
im.save(out, hotspot=hotspot)
with Image.open(out) as reloaded:
self.assertEqual(reloaded.info["hotspot"], hotspot)