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