You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/dask/tests/test_datasets.py

35 lines
751 B

import dask
import pytest
def test_mimesis():
pytest.importorskip('mimesis')
b = dask.datasets.make_people()
assert b.take(5)
assert b.take(3) == b.take(3)
def test_full_dataset():
pytest.importorskip('mimesis')
b = dask.datasets.make_people(npartitions=2, records_per_partition=10)
assert b.count().compute() == 20
def test_no_mimesis():
try:
import mimesis # noqa: F401
except ImportError:
with pytest.raises(Exception) as info:
dask.datasets.make_people()
assert "pip install mimesis" in str(info.value)
def test_deterministic():
pytest.importorskip('mimesis')
b = dask.datasets.make_people(seed=123)
assert b.take(1)[0]['name'] == ('Leandro', 'Orr')