Skip to content

Commit

Permalink
test: add test that / performs true division, not floor division
Browse files Browse the repository at this point in the history
  • Loading branch information
NickCrews committed Oct 23, 2024
1 parent fbf214d commit e093b69
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ibis/backends/tests/test_numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,13 @@ def test_binary_arithmetic_operations(backend, alltypes, df, op):
backend.assert_series_equal(result, expected, check_exact=False)


@pytest.mark.notimpl("flink", raises=AssertionError, reason="Flink does floor division")
def test_integer_truediv(con):
expr = 1 / ibis.literal(2)
result = con.execute(expr)
assert result == 0.5


def test_mod(backend, alltypes, df):
expr = operator.mod(alltypes.smallint_col, alltypes.smallint_col + 1).name("tmp")

Expand Down

0 comments on commit e093b69

Please sign in to comment.