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

Function test_api

dask/dataframe/tests/test_api.py:12–33  ·  view source on GitHub ↗

Tests that `dask.array.__all__` is correct

()

Source from the content-addressed store, hash-verified

10
11
12def test_api():
13 """Tests that `dask.array.__all__` is correct"""
14 import dask.dataframe as ddf
15
16 member_dict = vars(ddf)
17 members = set(member_dict)
18 # unexported submodules
19 members -= {"tests", "dask"}
20 members -= {
21 m
22 for m, mod in member_dict.items()
23 if m not in DA_EXPORTED_SUBMODULES
24 if isinstance(mod, ModuleType)
25 and mod.__spec__.parent
26 and mod.__spec__.parent.startswith("dask.dataframe")
27 }
28 # imported utility modules
29 members -= {"annotations"}
30 # private utilities and `__dunder__` members
31 members -= {m for m in members if m.startswith("_")}
32
33 assert set(ddf.__all__) == members

Callers

nothing calls this directly

Calls 2

setClass · 0.85
itemsMethod · 0.45

Tested by

no test coverage detected