Skip to content

Commit

Permalink
less strict asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
djarecka committed May 24, 2020
1 parent 09285c6 commit d13385d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions pydra/engine/tests/test_submitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def test_slurm_wf_state(tmpdir):


@pytest.mark.skipif(not slurm_available, reason="slurm not installed")
@pytest.mark.flaky(reruns=3)
def test_slurm_max_jobs(tmpdir):
wf = Workflow("new_wf", input_spec=["x", "y"], cache_dir=tmpdir)
wf.inputs.x = 5
Expand Down
24 changes: 12 additions & 12 deletions pydra/engine/tests/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2074,7 +2074,7 @@ def test_wf_nostate_cachelocations(plugin, tmpdir):
# for win and dask/slurm the time for dir creation etc. might take much longer
if not sys.platform.startswith("win") and plugin == "cf":
assert t1 > 2
assert t2 < 0.5
assert t2 < 1

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

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

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

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

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

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

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

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

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

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


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


@pytest.fixture
Expand Down

0 comments on commit d13385d

Please sign in to comment.