Пример #1
0
def test_erange_cardinality_over_one_order_of_magnitude(series_key, low):
    high = low * 10.0
    assume(not math.isinf(high))
    values = list(erange(series_key, low, high))
    include_end = bool(high in values)
    cardinality = series_key + include_end
    assert len(values) == cardinality
Пример #2
0
def test_erange_start_stop_in_wrong_order_raises_value_error():
    with raises(ValueError):
        erange(E12, 10, 8)
Пример #3
0
def test_erange_stop_too_small_raises_value_error():
    with raises(ValueError):
        erange(E12, 10, 0)
Пример #4
0
def test_erange_start_too_small_raises_value_error():
    with raises(ValueError):
        erange(E12, 0, 10)
Пример #5
0
def test_erange_stop_infinite_raises_value_error():
    with raises(ValueError):
        erange(E12, 10, float("inf"))
Пример #6
0
def test_erange_start_infinite_raises_value_error():
    with raises(ValueError):
        inf = float("inf")
        erange(E12, inf, 10)