Skip to content

Commit d13385d

Browse files
committed
less strict asserts
1 parent 09285c6 commit d13385d

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

pydra/engine/tests/test_submitter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ def test_slurm_wf_state(tmpdir):
196196

197197

198198
@pytest.mark.skipif(not slurm_available, reason="slurm not installed")
199+
@pytest.mark.flaky(reruns=3)
199200
def test_slurm_max_jobs(tmpdir):
200201
wf = Workflow("new_wf", input_spec=["x", "y"], cache_dir=tmpdir)
201202
wf.inputs.x = 5

pydra/engine/tests/test_workflow.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2074,7 +2074,7 @@ def test_wf_nostate_cachelocations(plugin, tmpdir):
20742074
# for win and dask/slurm the time for dir creation etc. might take much longer
20752075
if not sys.platform.startswith("win") and plugin == "cf":
20762076
assert t1 > 2
2077-
assert t2 < 0.5
2077+
assert t2 < 1
20782078

20792079
# checking if the second wf didn't run again
20802080
assert wf1.output_dir.exists()
@@ -2132,7 +2132,7 @@ def test_wf_nostate_cachelocations_a(plugin, tmpdir):
21322132
# checking execution time (second one should be quick)
21332133
assert t1 > 2
21342134
# testing relative values (windows or slurm takes much longer to create wf itself)
2135-
assert t2 < 0.5
2135+
assert t2 < 1
21362136

21372137
# checking if both wf.output_dir are created
21382138
assert wf1.output_dir.exists()
@@ -2192,7 +2192,7 @@ def test_wf_nostate_cachelocations_b(plugin, tmpdir):
21922192
if not sys.platform.startswith("win") and plugin == "cf":
21932193
# checking execution time
21942194
assert t1 > 2
2195-
assert t2 < 0.5
2195+
assert t2 < 1
21962196

21972197
# checking if the second wf didn't run again
21982198
assert wf1.output_dir.exists()
@@ -2251,7 +2251,7 @@ def test_wf_nostate_cachelocations_setoutputchange(plugin, tmpdir):
22512251
# checking execution time (the second wf should be fast, nodes do not have to rerun)
22522252
assert t1 > 2
22532253
# testing relative values (windows or slurm takes much longer to create wf itself)
2254-
assert t2 < 0.5
2254+
assert t2 < 1
22552255

22562256
# both wf output_dirs should be created
22572257
assert wf1.output_dir.exists()
@@ -2307,7 +2307,7 @@ def test_wf_nostate_cachelocations_setoutputchange_a(plugin, tmpdir):
23072307
# checking execution time (the second wf should be fast, nodes do not have to rerun)
23082308
assert t1 > 2
23092309
# testing relative values (windows or slurm takes much longer to create wf itself)
2310-
assert t2 < 0.5
2310+
assert t2 < 1
23112311

23122312
# both wf output_dirs should be created
23132313
assert wf1.output_dir.exists()
@@ -2489,7 +2489,7 @@ def test_wf_nostate_cachelocations_wftaskrerun_propagateFalse(plugin, tmpdir):
24892489
if not sys.platform.startswith("win") and plugin == "cf":
24902490
# checking the time
24912491
assert t1 > 2
2492-
assert t2 < 0.5
2492+
assert t2 < 1
24932493

24942494
# tasks should not be recomputed
24952495
assert len(list(Path(cache_dir1).glob("F*"))) == 2
@@ -2704,7 +2704,7 @@ def test_wf_state_cachelocations(plugin, tmpdir):
27042704
if not sys.platform.startswith("win") and plugin == "cf":
27052705
# checking the execution time
27062706
assert t1 > 2
2707-
assert t2 < 0.5
2707+
assert t2 < 1
27082708

27092709
# checking all directories
27102710
assert wf1.output_dir
@@ -2840,7 +2840,7 @@ def test_wf_state_cachelocations_updateinp(plugin, tmpdir):
28402840
if not sys.platform.startswith("win") and plugin == "cf":
28412841
# checking the execution time
28422842
assert t1 > 2
2843-
assert t2 < 0.5
2843+
assert t2 < 1
28442844

28452845
# checking all directories
28462846
assert wf1.output_dir
@@ -3068,7 +3068,7 @@ def test_wf_ndstate_cachelocations(plugin, tmpdir):
30683068
if not sys.platform.startswith("win") and plugin == "cf":
30693069
# checking the execution time
30703070
assert t1 > 2
3071-
assert t2 < 0.5
3071+
assert t2 < 1
30723072

30733073
# checking all directories
30743074
assert wf1.output_dir.exists()
@@ -3194,7 +3194,7 @@ def test_wf_ndstate_cachelocations_updatespl(plugin, tmpdir):
31943194
if not sys.platform.startswith("win") and plugin == "cf":
31953195
# checking the execution time
31963196
assert t1 > 2
3197-
assert t2 < 0.5
3197+
assert t2 < 1
31983198

31993199
# checking all directories
32003200
assert wf1.output_dir.exists()
@@ -3310,7 +3310,7 @@ def test_wf_nostate_runtwice_usecache(plugin, tmpdir):
33103310
if not sys.platform.startswith("win") and plugin == "cf":
33113311
# checking the execution time
33123312
assert t1 > 2
3313-
assert t2 < 0.5
3313+
assert t2 < 1
33143314

33153315

33163316
def test_wf_state_runtwice_usecache(plugin, tmpdir):
@@ -3359,7 +3359,7 @@ def test_wf_state_runtwice_usecache(plugin, tmpdir):
33593359
if not sys.platform.startswith("win") and plugin == "cf":
33603360
# checking the execution time
33613361
assert t1 > 2
3362-
assert t2 < 0.5
3362+
assert t2 < 1
33633363

33643364

33653365
@pytest.fixture

0 commit comments

Comments
 (0)