()
| 5024 | |
| 5025 | |
| 5026 | def test_does_not_mutate_timedelta_nested(): |
| 5027 | # ARROW-17893: dataframe with timedelta and a list of dictionary |
| 5028 | # also with timedelta produces wrong result with to_pandas |
| 5029 | |
| 5030 | from datetime import timedelta |
| 5031 | timedelta_1 = [{"timedelta_1": timedelta(seconds=12, microseconds=1)}] |
| 5032 | timedelta_2 = [timedelta(hours=3, minutes=40, seconds=23)] |
| 5033 | table = pa.table({"timedelta_1": timedelta_1, "timedelta_2": timedelta_2}) |
| 5034 | df = table.to_pandas() |
| 5035 | |
| 5036 | assert df["timedelta_2"][0].to_pytimedelta() == timedelta_2[0] |
| 5037 | |
| 5038 | |
| 5039 | def test_roundtrip_nested_map_table_with_pydicts(): |
nothing calls this directly
no outgoing calls
no test coverage detected