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
def test_erange_start_stop_in_wrong_order_raises_value_error(): with raises(ValueError): erange(E12, 10, 8)
def test_erange_stop_too_small_raises_value_error(): with raises(ValueError): erange(E12, 10, 0)
def test_erange_start_too_small_raises_value_error(): with raises(ValueError): erange(E12, 0, 10)
def test_erange_stop_infinite_raises_value_error(): with raises(ValueError): erange(E12, 10, float("inf"))
def test_erange_start_infinite_raises_value_error(): with raises(ValueError): inf = float("inf") erange(E12, inf, 10)