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

Function test_copy

dask/dataframe/tests/test_dataframe.py:4114–4132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4112
4113
4114def test_copy():
4115 df = pd.DataFrame({"x": [1, 2, 3]})
4116
4117 a = dd.from_pandas(df, npartitions=2)
4118 b = a.copy()
4119 c = a.copy(deep=False)
4120
4121 a["y"] = a.x * 2
4122
4123 assert_eq(b, df)
4124 assert_eq(c, df)
4125
4126 deep_err = (
4127 "The `deep` value must be False. This is strictly a shallow copy "
4128 "of the underlying computational graph."
4129 )
4130 for deep in [True, None, ""]:
4131 with pytest.raises(ValueError, match=deep_err):
4132 a.copy(deep=deep)
4133
4134
4135def test_del():

Callers

nothing calls this directly

Calls 2

assert_eqFunction · 0.90
copyMethod · 0.45

Tested by

no test coverage detected