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

Method test_non_nano

pandas/tests/arrays/test_timedeltas.py:25–30  ·  view source on GitHub ↗
(self, unit)

Source from the content-addressed store, hash-verified

23 return TimedeltaArray._simple_new(arr, dtype=arr.dtype)
24
25 def test_non_nano(self, unit):
26 arr = np.arange(5, dtype=np.int64).view(f"m8[{unit}]")
27 tda = TimedeltaArray._simple_new(arr, dtype=arr.dtype)
28
29 assert tda.dtype == arr.dtype
30 assert tda[0].unit == unit
31
32 def test_as_unit_raises(self, tda):
33 # GH#50616

Callers

nothing calls this directly

Calls 2

viewMethod · 0.45
_simple_newMethod · 0.45

Tested by

no test coverage detected