Пример #1
0
def test_invalid_file():
    with open("Tests/images/flower.jpg", "rb") as fp:
        with pytest.raises(SyntaxError):
            DcxImagePlugin.DcxImageFile(fp)
Пример #2
0
 def test_invalid_file(self):
     with open("Tests/images/flower.jpg", "rb") as fp:
         self.assertRaises(SyntaxError,
                           lambda: DcxImagePlugin.DcxImageFile(fp))