MCPcopy Index your code
hub / github.com/dask/dask / _assert_info

Function _assert_info

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

Source from the content-addressed store, hash-verified

3520
3521
3522def _assert_info(df, ddf, memory_usage=True):
3523 from io import StringIO
3524
3525 assert isinstance(df, pd.DataFrame)
3526 assert isinstance(ddf, dd.DataFrame)
3527
3528 buf_pd, buf_da = StringIO(), StringIO()
3529
3530 df.info(buf=buf_pd, memory_usage=memory_usage)
3531 ddf.info(buf=buf_da, verbose=True, memory_usage=memory_usage)
3532
3533 stdout_pd = buf_pd.getvalue()
3534 stdout_da = buf_da.getvalue()
3535 stdout_da = stdout_da.replace(str(type(ddf)), str(type(df)))
3536 # TODO
3537 assert stdout_pd == stdout_da
3538
3539
3540def test_gh_1301():

Callers

nothing calls this directly

Calls 2

infoMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…