mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
15 lines
366 B
Python
15 lines
366 B
Python
from .helper import PillowTestCase, hopper, fromstring
|
|
|
|
|
|
class TestImageToBitmap(PillowTestCase):
|
|
def test_sanity(self):
|
|
|
|
self.assertRaises(ValueError, lambda: hopper().tobitmap())
|
|
|
|
im1 = hopper().convert("1")
|
|
|
|
bitmap = im1.tobitmap()
|
|
|
|
self.assertIsInstance(bitmap, bytes)
|
|
self.assert_image_equal(im1, fromstring(bitmap))
|