Esempio n. 1
0
def test_invalid_tensor_construction():
    with pytest.raises(TypeError):
        pa.Tensor()
Esempio n. 2
0
def test_invalid_tensor_operation():
    t = pa.Tensor()
    with pytest.raises(TypeError):
        t.to_numpy()
Esempio n. 3
0
def test_invalid_tensor_constructor_repr():
    # ARROW-2638: prevent calling extension class constructors directly
    with pytest.raises(TypeError):
        repr(pa.Tensor([1]))
Esempio n. 4
0
def test_invalid_tensor_constructor_repr():
    t = pa.Tensor([1])
    assert repr(t) == '<invalid pyarrow.Tensor>'