Skip to content

Commit

Permalink
tests: add dask
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Mar 5, 2021
1 parent 28823f4 commit 3cab883
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions environment.yml
Expand Up @@ -25,6 +25,7 @@ dependencies:
- flake8-comprehensions
- coverage
# extras
- dask # dask
- matplotlib # gui
- numpy # pandas, keras, contrib.tenumerate
- pandas
Expand Down
19 changes: 19 additions & 0 deletions tests/tests_dask.py
@@ -0,0 +1,19 @@
from __future__ import division

from time import sleep

from .tests_tqdm import importorskip, mark

pytestmark = mark.slow


def test_dask(capsys):
"""Test tqdm.dask.TqdmCallback"""
ProgressBar = importorskip('tqdm.dask').TqdmCallback
dask = importorskip('dask')

schedule = [dask.delayed(sleep)(i / 10) for i in range(5)]
with ProgressBar():
dask.compute(schedule)
_, err = capsys.readouterr()
assert '5/5' in err
1 change: 1 addition & 0 deletions tox.ini
Expand Up @@ -27,6 +27,7 @@ passenv=TOXENV CI GITHUB_* CODECOV_* COVERALLS_* CODACY_* HOME
deps=
{[core]deps}
cython
dask[delayed]
matplotlib
numpy
pandas
Expand Down

0 comments on commit 3cab883

Please sign in to comment.