Ejemplo n.º 1
0
def test_point_bounds_check():
    df = pd.DataFrame({'x': [1, 2, 3], 'y': [5, 6, 7]})
    p = Point('x', 'y')
    assert p._compute_x_bounds(df['x'].values) == (1, 3)
    assert p._compute_y_bounds(df['y'].values) == (5, 7)
Ejemplo n.º 2
0
def test_point_validate():
    p = Point('x', 'y')
    p.validate(dshape("{x: int32, y: float32}"))
    with pytest.raises(ValueError):
        p.validate(dshape("{x: string, y: float32}"))
Ejemplo n.º 3
0
def test_point_validate():
    p = Point('x', 'y')
    p.validate(dshape("{x: int32, y: float32}"))
    with pytest.raises(ValueError):
        p.validate(dshape("{x: string, y: float32}"))
Ejemplo n.º 4
0
def test_point_bounds_check():
    df = pd.DataFrame({'x': [1, 2, 3], 'y': [5, 6, 7]})
    p = Point('x', 'y')
    assert p._compute_x_bounds(df['x'].values) == (1, 3)
    assert p._compute_y_bounds(df['y'].values) == (5, 7)