(op_fun: Any)
| 786 | ], |
| 787 | ) |
| 788 | def 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]) |
nothing calls this directly
no test coverage detected