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

Function test_meta

dask/dataframe/tests/test_boolean.py:8–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6
7
8def test_meta():
9 values = pd.array([True, False, None], dtype="boolean")
10 ds = dd.from_pandas(pd.Series(values), 2)
11 assert ds.dtype == pd.BooleanDtype()
12
13 dd.utils.assert_eq(ds._meta_nonempty, pd.Series([True, pd.NA], dtype="boolean"))
14
15 ddf = dd.from_pandas(pd.DataFrame({"A": values}), 2)
16 assert ddf.dtypes["A"] == pd.BooleanDtype()
17
18 dd.utils.assert_eq(
19 ddf._meta_nonempty,
20 pd.DataFrame({"A": pd.array([True, pd.NA], dtype="boolean")}),
21 )
22
23
24def test_ops():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected