Skip to content

Commit

Permalink
test(timestamp): add expression test for timestamp range with express…
Browse files Browse the repository at this point in the history
…ion inputs
  • Loading branch information
cpcloud committed Jul 22, 2024
1 parent f019b67 commit 0680bf2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ibis/tests/expr/test_timestamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,14 @@ def test_timestamp_field_access_on_time_failure(
def test_integer_timestamp_fails(value):
with pytest.raises(TypeError, match=r"Use ibis\.literal\(\.\.\.\)\.to_timestamp"):
ibis.timestamp(value)


def test_timestamp_range_with_expr_inputs():
start = ibis.now() - ibis.interval(days=1)
stop = ibis.now()
expr = ibis.range(start, stop, ibis.interval(seconds=1))

dtype = expr.type()

assert dtype.is_array()
assert dtype.value_type.is_timestamp()

0 comments on commit 0680bf2

Please sign in to comment.