MCPcopy Create free account
hub / github.com/dask/dask / _assert_info

Function _assert_info

dask/dataframe/tests/test_dataframe.py:3534–3549  ·  view source on GitHub ↗
(df, ddf, memory_usage=True)

Source from the content-addressed store, hash-verified

3532
3533
3534def _assert_info(df, ddf, memory_usage=True):
3535 from io import StringIO
3536
3537 assert isinstance(df, pd.DataFrame)
3538 assert isinstance(ddf, dd.DataFrame)
3539
3540 buf_pd, buf_da = StringIO(), StringIO()
3541
3542 df.info(buf=buf_pd, memory_usage=memory_usage)
3543 ddf.info(buf=buf_da, verbose=True, memory_usage=memory_usage)
3544
3545 stdout_pd = buf_pd.getvalue()
3546 stdout_da = buf_da.getvalue()
3547 stdout_da = stdout_da.replace(str(type(ddf)), str(type(df)))
3548 # TODO
3549 assert stdout_pd == stdout_da
3550
3551
3552def test_gh_1301():

Callers

nothing calls this directly

Calls 2

infoMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected