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

Function test_info_show_counts_false

pandas/tests/series/methods/test_info.py:195–212  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193
194
195def test_info_show_counts_false():
196 s = Series([1])
197 buf = StringIO()
198 s.info(buf=buf, show_counts=False)
199 result = buf.getvalue()
200 memory_bytes = float(s.memory_usage())
201 expected = textwrap.dedent(
202 f"""\
203 <class 'pandas.Series'>
204 RangeIndex: 1 entries, 0 to 0
205 Series name: None
206 Dtype
207 -----
208 int64
209 dtypes: int64(1)
210 memory usage: {memory_bytes} bytes"""
211 )
212 assert result.strip() == expected.strip()

Callers

nothing calls this directly

Calls 4

infoMethod · 0.95
memory_usageMethod · 0.95
SeriesClass · 0.90
stripMethod · 0.80

Tested by

no test coverage detected