def test_equality(self):
        a = Chart(self.position, self.progress, self.listeners, self.shift)
        b = Chart(10, self.progress, self.listeners, self.shift)
        c = Chart(self.position, self.progress, 10, self.shift)
        d = Chart(self.position, self.progress, self.listeners, self.shift)

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

        assert a == d
Exemplo n.º 2
0
def chart(track_id):
    return Chart(TestChart.position, TestChart.progress, TestChart.listeners, TestChart.shift, track_id)