Package: dask.distributed / 2.10.0+ds.1-3

override-worker-test.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- a/distributed/tests/test_worker.py
+++ b/distributed/tests/test_worker.py
@@ -236,7 +236,10 @@
 @gen_cluster(client=True)
 def test_upload_egg(c, s, a, b):
     eggname = "testegg-1.0.0-py3.4.egg"
-    local_file = __file__.replace("test_worker.py", eggname)
+    if 'AUTOPKGTEST_TMP' in os.environ:
+        local_file = os.path.abspath(eggname)
+    else:
+        local_file = __file__.replace('test_worker.py', eggname)
     assert not os.path.exists(os.path.join(a.local_directory, eggname))
     assert not os.path.exists(os.path.join(b.local_directory, eggname))
     assert a.local_directory != b.local_directory
@@ -265,6 +268,10 @@
 @gen_cluster(client=True)
 def test_upload_pyz(c, s, a, b):
     pyzname = "mytest.pyz"
+    if 'AUTOPKGTEST_TMP' in os.environ:
+        local_file = os.path.abspath(pyzname)
+    else:
+        local_file = __file__.replace('test_worker.py', pyzname)
     local_file = __file__.replace("test_worker.py", pyzname)
     assert not os.path.exists(os.path.join(a.local_directory, pyzname))
     assert not os.path.exists(os.path.join(b.local_directory, pyzname))