Removed unnecessary lambdas

This commit is contained in:
Andrew Murray 2015-04-02 18:08:14 +11:00
parent 7f414057c9
commit 76fec69eda
4 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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):

View File

@ -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))

View File

@ -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))