python-dask/0002-Make-distributed-tests...

47 lines
1.5 KiB
Diff

From 04b7d5986fcf853c652557a3c837dae86a5c1d3e Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Mon, 22 Jul 2019 03:27:22 -0400
Subject: [PATCH 2/3] Make distributed tests optional again.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
dask/tests/test_base.py | 4 ----
dask/tests/test_distributed.py | 5 +++++
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dask/tests/test_base.py b/dask/tests/test_base.py
index 7fceec7d..864b2073 100644
--- a/dask/tests/test_base.py
+++ b/dask/tests/test_base.py
@@ -1018,7 +1018,3 @@ def test_num_workers_config(scheduler):
workers = {i.worker_id for i in prof.results}
assert len(workers) == num_workers
-
-
-if sys.version_info >= (3, 5):
- from dask.tests.py3_test_await import * # noqa F401
diff --git a/dask/tests/test_distributed.py b/dask/tests/test_distributed.py
index 60e8cf32..7ed081f6 100644
--- a/dask/tests/test_distributed.py
+++ b/dask/tests/test_distributed.py
@@ -2,6 +2,7 @@ import pytest
distributed = pytest.importorskip("distributed")
+import sys
from functools import partial
from operator import add
from tornado import gen
@@ -194,3 +195,7 @@ def test_scheduler_equals_client(loop):
assert client.run_on_scheduler(
lambda dask_scheduler: dask_scheduler.story(x.key)
)
+
+
+if sys.version_info >= (3, 5):
+ from dask.tests.py3_test_await import * # noqa F401
--
2.21.0