Merge pull request #2560 from radarhere/tests

Minor test changes
This commit is contained in:
Hugo 2017-05-30 19:13:02 +03:00 committed by GitHub
commit 0b9d378d17
2 changed files with 3 additions and 3 deletions

View File

@ -26,8 +26,8 @@ class TestFileCur(PillowTestCase):
no_cursors_file = "Tests/images/no_cursors.cur"
cur = CurImagePlugin.CurImageFile(TEST_FILE)
cur.fp = open(no_cursors_file, "rb")
self.assertRaises(TypeError, cur._open)
with open(no_cursors_file, "rb") as cur.fp:
self.assertRaises(TypeError, cur._open)
if __name__ == '__main__':

View File

@ -390,7 +390,7 @@ class TestRegistry(PillowTestCase):
def test_encode_registry(self):
Image.register_encoder('MOCK', mock_encode)
self.assert_('MOCK' in Image.ENCODERS)
self.assertIn('MOCK', Image.ENCODERS)
enc = Image._getencoder('RGB', 'MOCK', ('args',), extra=('extra',))