Skip to content

Commit f54640b

Browse files
committed
updated flaky kwargs to latest version (reruns -> max_runs)
1 parent 2daf48f commit f54640b

File tree

6 files changed

+50
-50
lines changed

6 files changed

+50
-50
lines changed

pydra/engine/tests/test_boutiques.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
@no_win
2323
@need_bosh_docker
24-
@pytest.mark.flaky(reruns=3) # need for travis
24+
@pytest.mark.flaky(max_runs=3) # need for travis
2525
@pytest.mark.parametrize(
2626
"maskfile", ["test_brain.nii.gz", "test_brain", "test_brain.nii"]
2727
)
@@ -45,7 +45,7 @@ def test_boutiques_1(maskfile, plugin, results_function, tmpdir, data_tests_dir)
4545

4646
@no_win
4747
@need_bosh_docker
48-
@pytest.mark.flaky(reruns=3)
48+
@pytest.mark.flaky(max_runs=3)
4949
def test_boutiques_spec_1(data_tests_dir):
5050
"""testing spec: providing input/output fields names"""
5151
btask = BoshTask(
@@ -70,7 +70,7 @@ def test_boutiques_spec_1(data_tests_dir):
7070

7171
@no_win
7272
@need_bosh_docker
73-
@pytest.mark.flaky(reruns=3)
73+
@pytest.mark.flaky(max_runs=3)
7474
def test_boutiques_spec_2(data_tests_dir):
7575
"""testing spec: providing partial input/output fields names"""
7676
btask = BoshTask(
@@ -93,7 +93,7 @@ def test_boutiques_spec_2(data_tests_dir):
9393

9494
@no_win
9595
@need_bosh_docker
96-
@pytest.mark.flaky(reruns=3)
96+
@pytest.mark.flaky(max_runs=3)
9797
@pytest.mark.parametrize(
9898
"maskfile", ["test_brain.nii.gz", "test_brain", "test_brain.nii"]
9999
)
@@ -125,7 +125,7 @@ def test_boutiques_wf_1(maskfile, plugin, tmpdir, infile):
125125

126126
@no_win
127127
@need_bosh_docker
128-
@pytest.mark.flaky(reruns=3)
128+
@pytest.mark.flaky(max_runs=3)
129129
@pytest.mark.xfail(reason="issues with bosh for 4472771")
130130
@pytest.mark.parametrize(
131131
"maskfile", ["test_brain.nii.gz", "test_brain", "test_brain.nii"]

pydra/engine/tests/test_node_task.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def test_odir_init():
358358
# Tests for tasks without state (i.e. no splitter)
359359

360360

361-
@pytest.mark.flaky(reruns=2) # when dask
361+
@pytest.mark.flaky(max_runs=2) # when dask
362362
def test_task_nostate_1(plugin_dask_opt, tmp_path):
363363
"""task without splitter"""
364364
nn = fun_addtwo(name="NA", a=3)
@@ -399,7 +399,7 @@ def test_task_nostate_1_call():
399399
assert nn.output_dir.exists()
400400

401401

402-
@pytest.mark.flaky(reruns=2) # when dask
402+
@pytest.mark.flaky(max_runs=2) # when dask
403403
def test_task_nostate_1_call_subm(plugin_dask_opt, tmp_path):
404404
"""task without splitter"""
405405
nn = fun_addtwo(name="NA", a=3)
@@ -417,7 +417,7 @@ def test_task_nostate_1_call_subm(plugin_dask_opt, tmp_path):
417417
assert nn.output_dir.exists()
418418

419419

420-
@pytest.mark.flaky(reruns=2) # when dask
420+
@pytest.mark.flaky(max_runs=2) # when dask
421421
def test_task_nostate_1_call_plug(plugin_dask_opt, tmp_path):
422422
"""task without splitter"""
423423
nn = fun_addtwo(name="NA", a=3)
@@ -549,7 +549,7 @@ def test_task_nostate_7():
549549
# Testing caching for tasks without states
550550

551551

552-
@pytest.mark.flaky(reruns=2) # when dask
552+
@pytest.mark.flaky(max_runs=2) # when dask
553553
def test_task_nostate_cachedir(plugin_dask_opt, tmp_path):
554554
"""task with provided cache_dir using pytest tmp_path"""
555555
cache_dir = tmp_path / "test_task_nostate"
@@ -566,7 +566,7 @@ def test_task_nostate_cachedir(plugin_dask_opt, tmp_path):
566566
assert results.output.out == 5
567567

568568

569-
@pytest.mark.flaky(reruns=2) # when dask
569+
@pytest.mark.flaky(max_runs=2) # when dask
570570
def test_task_nostate_cachedir_relativepath(tmp_path, plugin_dask_opt):
571571
"""task with provided cache_dir as relative path"""
572572
os.chdir(tmp_path)
@@ -587,7 +587,7 @@ def test_task_nostate_cachedir_relativepath(tmp_path, plugin_dask_opt):
587587
shutil.rmtree(cache_dir)
588588

589589

590-
@pytest.mark.flaky(reruns=2) # when dask
590+
@pytest.mark.flaky(max_runs=2) # when dask
591591
def test_task_nostate_cachelocations(plugin_dask_opt, tmp_path):
592592
"""
593593
Two identical tasks with provided cache_dir;
@@ -729,7 +729,7 @@ def test_task_nostate_cachelocations_updated(plugin, tmp_path):
729729
# Tests for tasks with states (i.e. with splitter)
730730

731731

732-
@pytest.mark.flaky(reruns=2) # when dask
732+
@pytest.mark.flaky(max_runs=2) # when dask
733733
@pytest.mark.parametrize("input_type", ["list", "array"])
734734
def test_task_state_1(plugin_dask_opt, input_type, tmp_path):
735735
"""task with the simplest splitter"""
@@ -1074,7 +1074,7 @@ def test_task_state_6a(plugin, tmp_path):
10741074
assert odir.exists()
10751075

10761076

1077-
@pytest.mark.flaky(reruns=2) # when dask
1077+
@pytest.mark.flaky(max_runs=2) # when dask
10781078
def test_task_state_comb_1(plugin_dask_opt, tmp_path):
10791079
"""task with the simplest splitter and combiner"""
10801080
nn = fun_addtwo(name="NA").split(a=[3, 5], splitter="a").combine(combiner="a")
@@ -1451,7 +1451,7 @@ def test_task_state_comb_contdim_2(tmp_path):
14511451
# Testing caching for tasks with states
14521452

14531453

1454-
@pytest.mark.flaky(reruns=2) # when dask
1454+
@pytest.mark.flaky(max_runs=2) # when dask
14551455
def test_task_state_cachedir(plugin_dask_opt, tmp_path):
14561456
"""task with a state and provided cache_dir using pytest tmp_path"""
14571457
cache_dir = tmp_path / "test_task_nostate"

pydra/engine/tests/test_shelltask.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
pytest.skip("SLURM not available in windows", allow_module_level=True)
2727

2828

29-
@pytest.mark.flaky(reruns=2) # when dask
29+
@pytest.mark.flaky(max_runs=2) # when dask
3030
@pytest.mark.parametrize("results_function", [result_no_submitter, result_submitter])
3131
def test_shell_cmd_1(plugin_dask_opt, results_function, tmp_path):
3232
"""simple command, no arguments"""
@@ -107,7 +107,7 @@ def test_shell_cmd_2b(plugin, results_function, tmp_path):
107107
# tests with State
108108

109109

110-
@pytest.mark.flaky(reruns=2)
110+
@pytest.mark.flaky(max_runs=2)
111111
def test_shell_cmd_3(plugin_dask_opt, tmp_path):
112112
"""commands without arguments
113113
splitter = executable
@@ -2174,7 +2174,7 @@ def test_shell_cmd_inputspec_copyfile_state_1(plugin, results_function, tmp_path
21742174
# customised input_spec in Workflow
21752175

21762176

2177-
@pytest.mark.flaky(reruns=2) # when dask
2177+
@pytest.mark.flaky(max_runs=2) # when dask
21782178
def test_wf_shell_cmd_2(plugin_dask_opt, tmp_path):
21792179
"""a workflow with input with defined output_file_template (str)
21802180
that requires wf.lzin

pydra/engine/tests/test_submitter.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def test_wf_in_wf(plugin, tmpdir):
134134
assert res.output.out == 7
135135

136136

137-
@pytest.mark.flaky(reruns=2) # when dask
137+
@pytest.mark.flaky(max_runs=2) # when dask
138138
def test_wf2(plugin_dask_opt, tmpdir):
139139
"""workflow as a node
140140
workflow-node with one task and no splitter
@@ -156,7 +156,7 @@ def test_wf2(plugin_dask_opt, tmpdir):
156156
assert res.output.out == 3
157157

158158

159-
@pytest.mark.flaky(reruns=2) # when dask
159+
@pytest.mark.flaky(max_runs=2) # when dask
160160
def test_wf_with_state(plugin_dask_opt, tmpdir):
161161
wf = Workflow(name="wf_with_state", input_spec=["x"])
162162
wf.add(sleep_add_one(name="taska", x=wf.lzin.x))
@@ -235,7 +235,7 @@ def test_slurm_wf_state(tmpdir):
235235

236236

237237
@need_slurm
238-
@pytest.mark.flaky(reruns=3)
238+
@pytest.mark.flaky(max_runs=3)
239239
def test_slurm_max_jobs(tmpdir):
240240
wf = Workflow("new_wf", input_spec=["x", "y"], cache_dir=tmpdir)
241241
wf.inputs.x = 5
@@ -338,7 +338,7 @@ def cancel(job_name_part):
338338
return proc.stderr.decode("utf-8").strip()
339339

340340

341-
@pytest.mark.flaky(reruns=1)
341+
@pytest.mark.flaky(max_runs=1)
342342
@need_slurm
343343
def test_slurm_cancel_rerun_1(tmpdir):
344344
"""testing that tasks run with slurm is re-queue
@@ -371,7 +371,7 @@ def test_slurm_cancel_rerun_1(tmpdir):
371371
assert script_dir.exists()
372372

373373

374-
@pytest.mark.flaky(reruns=1)
374+
@pytest.mark.flaky(max_runs=1)
375375
@need_slurm
376376
def test_slurm_cancel_rerun_2(tmpdir):
377377
"""testing that tasks run with slurm that has --no-requeue

0 commit comments

Comments
 (0)