MCPcopy Index your code
hub / github.com/pathwaycom/pathway / test_duration_div_zero

Function test_duration_div_zero

python/pathway/tests/test_operators.py:788–800  ·  view source on GitHub ↗
(op_fun: Any)

Source from the content-addressed store, hash-verified

786 ],
787)
788def test_duration_div_zero(op_fun: Any) -> None:
789 pairs = [
790 [pd.Timedelta(-763723)],
791 [pd.Timedelta(-980333)],
792 [pd.Timedelta(milliseconds=1)],
793 ]
794 for pair in pairs:
795 df = pd.DataFrame({"a": [pair[0]], "b": [pd.Timedelta(0)]})
796 table = table_from_pandas(df)
797 table.select(c=op_fun(pw.this["a"], pw.this["b"]))
798
799 with pytest.raises(ZeroDivisionError):
800 run_all()
801
802
803@pytest.mark.parametrize("is_naive", [True, False])

Callers

nothing calls this directly

Calls 3

table_from_pandasFunction · 0.90
run_allFunction · 0.90
selectMethod · 0.45

Tested by

no test coverage detected