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

Function test_str_size

pandas/tests/test_common.py:262–273  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

260@pytest.mark.skipif(WASM, reason="Can't start subprocesses in WASM")
261@pytest.mark.single_cpu
262def test_str_size():
263 # GH#21758
264 a = "a"
265 expected = sys.getsizeof(a)
266 pyexe = sys.executable.replace("\\", "/")
267 call = [
268 pyexe,
269 "-c",
270 "a='a';import sys;sys.getsizeof(a);import pandas;print(sys.getsizeof(a));",
271 ]
272 result = subprocess.check_output(call).decode()[-4:-1].strip("\n")
273 assert int(result) == int(expected)

Callers

nothing calls this directly

Calls 3

stripMethod · 0.80
decodeMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected