Exemplo n.º 1
0
def test_validate_dimensions_one_short_tuple():
    x = (1, )
    y = (2, -4, -5)

    with pytest.raises(ValueError) as e:
        validate_dimensions(x, y)

    assert str(e.value) == 'Input arrays must have at least two dimensions.'
Exemplo n.º 2
0
def test_validate_dimensions_valid():
    x = (-1, -2, -3)
    y = (4, 5, 6)

    assert validate_dimensions(x, y) == [x, y]
Exemplo n.º 3
0
def test_validate_dimensions_long_tuples_1():
    x = (-1, -2, -3, 4)
    y = (4, 5, 6, 7, 8, 0)

    assert validate_dimensions(x, y) == [x, (4, 5, 6, 7)]
Exemplo n.º 4
0
def test_validate_dimensions_long_tuples_1():
    x = (-1, -2, -3, 4)
    y = (4, 5, 6)

    assert validate_dimensions(x, y) == [(-1, -2, -3), y]