Skip to content
This repository has been archived by the owner on Feb 10, 2021. It is now read-only.

Commit

Permalink
Test start_workers/stop_workers with trivial args
Browse files Browse the repository at this point in the history
Add a test to ensure that `start_workers` can be passed `n = 0` without
issues. Also ensure this translates into no workers being added. Further
test that `stop_workers` can be called with an empty dictionary.
  • Loading branch information
jakirkham committed Apr 1, 2018
1 parent d99fd42 commit c0fd68d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dask_drmaa/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@
from distributed.utils import tmpfile


def test_no_workers(loop):
with DRMAACluster(scheduler_port=0) as cluster:
with Client(cluster, loop=loop) as client:
cluster.start_workers(0)
assert not cluster.workers
cluster.stop_workers({})

assert not os.path.exists(cluster.script)


def test_simple(loop):
with DRMAACluster(scheduler_port=0) as cluster:
with Client(cluster, loop=loop) as client:
Expand Down

0 comments on commit c0fd68d

Please sign in to comment.