(const: Any)
| 996 | ], |
| 997 | ) |
| 998 | def test_datetime_naive_sub_const(const: Any) -> None: |
| 999 | datetimes = [ |
| 1000 | "2023-05-15 01:59:59.999999999", |
| 1001 | "2023-05-15 11:59:59.999999999", |
| 1002 | ] |
| 1003 | fmt = "%Y-%m-%d %H:%M:%S.%f" |
| 1004 | df = pd.DataFrame({"a": datetimes}) |
| 1005 | table = table_from_pandas(df) |
| 1006 | table_with_dt = table.select(a=table.a.dt.strptime(fmt)) |
| 1007 | table_pw = table_with_dt.select(a=table_with_dt.a - const) |
| 1008 | |
| 1009 | df_new = pd.DataFrame({"a": pd.to_datetime(datetimes, format=fmt) - const}) |
| 1010 | table_pd = table_from_pandas(df_new) |
| 1011 | |
| 1012 | assert_table_equality(table_pw, table_pd) |
| 1013 | |
| 1014 | |
| 1015 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected