mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-28 02:46:18 +03:00
d50445ff30
Similar to the recent adoption of Black. isort is a Python utility to sort imports alphabetically and automatically separate into sections. By using isort, contributors can quickly and automatically conform to the projects style without thinking. Just let the tool do it. Uses the configuration recommended by the Black to avoid conflicts of style. Rewrite TestImageQt.test_deprecated to no rely on import order.
15 lines
366 B
Python
15 lines
366 B
Python
from .helper import PillowTestCase, fromstring, hopper
|
|
|
|
|
|
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))
|