Ejemplo n.º 1
0
def test_create_expr_integrated_size_error():
    """What happens when lovals and hivals have different sizes?"""

    with pytest.raises(ValueError) as exc:
        utils.create_expr_integrated([1, 2, 3, 4], [2, 3])

    assert str(exc.value) == 'hivals array mis-match with lovals'
Ejemplo n.º 2
0
def test_create_expr_integrated_mask_size_error():
    """What happens when lovals and mask have different sizes?"""

    with pytest.raises(ValueError) as exc:
        utils.create_expr_integrated([1, 2, 3, 4], [4, 5, 6, 7], [True, True])

    assert str(exc.value) == 'mask array mis-match with lovals'
Ejemplo n.º 3
0
def test_create_expr_integrated_docstring_mask(expected, lovals, hivals ,mask):
    """"Check the docstring examples"""

    out = utils.create_expr_integrated(lovals, hivals, mask)
    assert out == expected
Ejemplo n.º 4
0
def test_create_expr_integrated_empty():
    """"No data"""

    out = utils.create_expr_integrated([], [])
    assert out == ''