def test_init_missing_values(self): with pytest.raises(TypeError): DataPoint()
def test_init_too_many_values(self): with pytest.raises(TypeError): DataPoint(1, 2, 3)
def test_init(self): p = DataPoint(1, 2) assert p == (1, 2) assert p.index == 1 assert p.value == 2