File tree 2 files changed +1
-28
lines changed 2 files changed +1
-28
lines changed Original file line number Diff line number Diff line change @@ -70,21 +70,6 @@ def pytest_runtest_setup(item):
70
70
item .add_marker (pytest .mark .xfail (reason = xfail [env ]))
71
71
72
72
73
- @pytest .fixture (autouse = True )
74
- def mock_lsf_version (monkeypatch , request ):
75
- # Monkey-patch lsf_version() UNLESS the 'lsf' environment is selected.
76
- # In that case, the real lsf_version() function should work.
77
- markers = list (request .node .iter_markers ())
78
- if any ("lsf" in marker .args for marker in markers ):
79
- return
80
-
81
- try :
82
- dask_jobqueue .lsf .lsf_version ()
83
- except OSError :
84
- # Provide a fake implementation of lsf_version()
85
- monkeypatch .setattr (dask_jobqueue .lsf , "lsf_version" , lambda : "10" )
86
-
87
-
88
73
all_envs = {
89
74
None : LocalCluster ,
90
75
"pbs" : PBSCluster ,
Original file line number Diff line number Diff line change 1
- from distutils .version import LooseVersion
2
-
3
1
import logging
4
2
import math
5
3
import os
6
- import re
7
- import subprocess
8
- import toolz
9
4
10
5
import dask
11
6
@@ -113,7 +108,7 @@ def __init__(
113
108
async def _submit_job (self , script_filename ):
114
109
if self .use_stdin :
115
110
piped_cmd = [self .submit_command + "< " + script_filename + " 2> /dev/null" ]
116
- return self ._call (piped_cmd , shell = True )
111
+ return await self ._call (piped_cmd )
117
112
else :
118
113
result = await super ()._submit_job (script_filename )
119
114
return result
@@ -239,10 +234,3 @@ class LSFCluster(JobQueueCluster):
239
234
job = job_parameters , cluster = cluster_parameters
240
235
)
241
236
job_cls = LSFJob
242
-
243
-
244
- @toolz .memoize
245
- def lsf_version ():
246
- out , _ = subprocess .Popen ("lsid" , stdout = subprocess .PIPE ).communicate ()
247
- version = re .search (r"(\d+\.)+\d+" , out .decode ()).group ()
248
- return LooseVersion (version )
You can’t perform that action at this time.
0 commit comments