def test_equality(self): a = Label(self.id, self.name) b = Label(10, self.name) c = Label(self.id, '') d = Label(self.id, self.name) assert a != b != c assert hash(a) != hash(b) != hash(c) assert a is not b is not c assert a == d
def label(): return Label(TestLabel.id, TestLabel.name)
def label(request): if request.param: return Label(TestLabel.id, TestLabel.name) return TestLabel.another_representation_of_label