()
| 260 | @pytest.mark.skipif(WASM, reason="Can't start subprocesses in WASM") |
| 261 | @pytest.mark.single_cpu |
| 262 | def 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) |