def test_diff_image(self): port = FakePort(['diff: 100% failed\n']) image_differ = ImageDiffer(port) self.assertEquals(image_differ.diff_image('foo', 'bar', 0.1), ('', 100.0))
def test_diff_image_failed(self): port = FakePort(['diff: 100% failed\n']) image_differ = ImageDiffer(port) self.assertEqual(image_differ.diff_image('foo', 'bar', 0.1), ('', 100.0, None))
def test_diff_image_passed(self): port = FakePort(['diff: 0% passed\n']) image_differ = ImageDiffer(port) self.assertEqual(image_differ.diff_image('foo', 'bar', 0.1), (None, 0, None))
def test_diff_image_passed(self): port = FakePort(['diff: 0% passed\n']) image_differ = ImageDiffer(port) self.assertEquals(image_differ.diff_image('foo', 'bar', 0.1), (None, 0, None))