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

Function test_attributes

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

Source from the content-addressed store, hash-verified

209
210
211def test_attributes():
212 assert "a" in dir(d)
213 assert "foo" not in dir(d)
214 pytest.raises(AttributeError, lambda: d.foo)
215
216 df = dd.from_pandas(pd.DataFrame({"a b c": [1, 2, 3]}), npartitions=2)
217 assert "a b c" not in dir(df)
218 df = dd.from_pandas(pd.DataFrame({"a": [1, 2], 5: [1, 2]}), npartitions=2)
219 assert "a" in dir(df)
220 assert 5 not in dir(df)
221
222 df = dd.from_pandas(_compat.makeTimeDataFrame(), npartitions=3)
223 pytest.raises(AttributeError, lambda: df.foo)
224
225
226def test_column_names():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected