mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Removed unnecessary lambdas
This commit is contained in:
parent
7f414057c9
commit
76fec69eda
|
@ -245,7 +245,7 @@ class TestFilePng(PillowTestCase):
|
|||
|
||||
im = Image.open(TEST_PNG_FILE)
|
||||
im.load()
|
||||
self.assertRaises(RuntimeError, lambda: im.verify())
|
||||
self.assertRaises(RuntimeError, im.verify)
|
||||
|
||||
def test_roundtrip_dpi(self):
|
||||
# Check dpi roundtripping
|
||||
|
|
|
@ -18,7 +18,7 @@ class TestImageLoad(PillowTestCase):
|
|||
def test_close(self):
|
||||
im = Image.open("Tests/images/hopper.gif")
|
||||
im.close()
|
||||
self.assertRaises(ValueError, lambda: im.load())
|
||||
self.assertRaises(ValueError, im.load)
|
||||
self.assertRaises(ValueError, lambda: im.getpixel((0, 0)))
|
||||
|
||||
def test_contextmanager(self):
|
||||
|
|
|
@ -117,7 +117,7 @@ class TestImagePalette(PillowTestCase):
|
|||
palette = raw("RGB", list(range(256))*3)
|
||||
|
||||
# Act / Assert
|
||||
self.assertRaises(ValueError, lambda: palette.tobytes())
|
||||
self.assertRaises(ValueError, palette.tobytes)
|
||||
self.assertRaises(ValueError, lambda: palette.getcolor((1, 2, 3)))
|
||||
f = self.tempfile("temp.lut")
|
||||
self.assertRaises(ValueError, lambda: palette.save(f))
|
||||
|
|
|
@ -114,7 +114,7 @@ class TestImageWinDib(PillowTestCase):
|
|||
buffer = dib.tobytes()
|
||||
|
||||
# Act/Assert
|
||||
self.assert_warning(DeprecationWarning, lambda: dib.tostring())
|
||||
self.assert_warning(DeprecationWarning, dib.tostring)
|
||||
self.assert_warning(DeprecationWarning, lambda: dib.fromstring(buffer))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user