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

Function test_with_spec_default_integer

dask/dataframe/io/tests/test_demo.py:283–300  ·  view source on GitHub ↗
(seed)

Source from the content-addressed store, hash-verified

281
282@pytest.mark.parametrize("seed", [None, 42])
283def test_with_spec_default_integer(seed):
284 from dask.dataframe.io.demo import ColumnSpec, DatasetSpec, with_spec
285
286 spec = DatasetSpec(
287 npartitions=1,
288 nrecords=5,
289 column_specs=[
290 ColumnSpec(dtype=int),
291 ColumnSpec(dtype=int),
292 ColumnSpec(dtype=int),
293 ColumnSpec(dtype=int),
294 ],
295 )
296 ddf = with_spec(spec, seed=seed)
297 res = ddf.compute()
298 for col in res.columns:
299 assert 500 < res[col].min() < 1500
300 assert 500 < res[col].max() < 1500
301
302
303def test_with_spec_integer_method():

Callers

nothing calls this directly

Calls 6

DatasetSpecClass · 0.90
ColumnSpecClass · 0.90
with_specFunction · 0.90
computeMethod · 0.45
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected