Test case for #774

This commit is contained in:
hugovk 2014-07-05 16:29:40 +03:00
parent 8e6ef35f78
commit f6f80e3a77

View File

@ -44,6 +44,17 @@ class TestImage(PillowTestCase):
file = self.tempfile("temp.ppm") file = self.tempfile("temp.ppm")
im._dump(file) im._dump(file)
def test_comparison_with_other_type(self):
# Arrange
item = Image.new('RGB', (25, 25), '#000')
num = 12
# Act/Assert
# Shouldn't cause AttributeError (#774)
self.assertFalse(item is None)
self.assertFalse(item == None)
self.assertFalse(item == num)
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()