def test_invalid_file(self): invalid_file = "Tests/images/flower.jpg" self.assertRaises(SyntaxError, lambda: PcxImagePlugin.PcxImageFile(invalid_file))
def test_invalid_file(): invalid_file = "Tests/images/flower.jpg" with pytest.raises(SyntaxError): PcxImagePlugin.PcxImageFile(invalid_file)