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

Method test_iterable_items

pandas/tests/base/test_conversion.py:105–114  ·  view source on GitHub ↗
(self, dtype, rdtype)

Source from the content-addressed store, hash-verified

103
104 @pytest.mark.parametrize("dtype, rdtype", dtypes)
105 def test_iterable_items(self, dtype, rdtype):
106 # gh-13258
107 # test if items yields the correct boxed scalars
108 # this only applies to series
109 s = Series([1], dtype=dtype)
110 _, result = next(iter(s.items()))
111 assert isinstance(result, rdtype)
112
113 _, result = next(iter(s.items()))
114 assert isinstance(result, rdtype)
115
116 @pytest.mark.parametrize(
117 "dtype, rdtype", [*dtypes, ("object", int), ("category", int)]

Callers

nothing calls this directly

Calls 2

itemsMethod · 0.95
SeriesClass · 0.90

Tested by

no test coverage detected