def test_equality(self):
        a = Icon(self.background_color, self.image_url)
        b = Icon('#000000', self.image_url)
        c = Icon(self.background_color, '')
        d = Icon(self.background_color, self.image_url)

        assert a != b != c
        assert hash(a) != hash(b) != hash(c)
        assert a is not b is not c

        assert a == d
Beispiel #2
0
def icon():
    return Icon(TestIcon.background_color, TestIcon.image_url)