Skip to content

Commit

Permalink
Test case for python-pillow#774
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Jul 5, 2014
1 parent 8e6ef35 commit f6f80e3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ def test_internals(self):
file = self.tempfile("temp.ppm")
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__':
unittest.main()
Expand Down

0 comments on commit f6f80e3

Please sign in to comment.