MCPcopy
hub / github.com/pandas-dev/pandas / _compare_with_tz

Function _compare_with_tz

pandas/tests/io/pytables/test_timezones.py:23–32  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

21
22
23def _compare_with_tz(a, b):
24 tm.assert_frame_equal(a, b)
25
26 # compare the zones on each element
27 for c in a.columns:
28 for i in a.index:
29 a_e = a.loc[i, c]
30 b_e = b.loc[i, c]
31 if not (a_e == b_e and a_e.tz == b_e.tz):
32 raise AssertionError(f"invalid tz comparison [{a_e}] [{b_e}]")
33
34
35# use maybe_get_tz instead of dateutil.tz.gettz to handle the windows

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected