Skip to content

Commit 741f4e5

Browse files
committed
tests: address B908 by only checking one statement for the expected exception
1 parent b30702e commit 741f4e5

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

tests/test_examples.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,8 +816,7 @@ def test_lifting() -> None:
816816
# fails if the step 'out' doesn't match.
817817
factory = cwltool.factory.Factory()
818818
with pytest.raises(ValidationException):
819-
echo = factory.make(get_data("tests/test_bad_outputs_wf.cwl"))
820-
assert echo(inp="foo") == {"out": "foo\n"}
819+
factory.make(get_data("tests/test_bad_outputs_wf.cwl"))
821820

822821

823822
def test_malformed_outputs() -> None:

tests/test_mpi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,15 +347,15 @@ def test_docker_required(schema_ext11: Names) -> None:
347347

348348
def test_docker_mpi_both_required(schema_ext11: Names) -> None:
349349
# Both required - error
350+
lc, rc, tool = mk_tool(schema_ext11, [], reqs=[mpiReq, containerReq])
351+
clt = CommandLineTool(tool, lc)
350352
with pytest.raises(cwltool.errors.UnsupportedRequirement):
351-
lc, rc, tool = mk_tool(schema_ext11, [], reqs=[mpiReq, containerReq])
352-
clt = CommandLineTool(tool, lc)
353353
clt.make_job_runner(rc)
354354

355355

356356
def test_docker_mpi_both_hinted(schema_ext11: Names) -> None:
357357
# Both hinted - error
358+
lc, rc, tool = mk_tool(schema_ext11, [], hints=[mpiReq, containerReq])
359+
clt = CommandLineTool(tool, lc)
358360
with pytest.raises(cwltool.errors.UnsupportedRequirement):
359-
lc, rc, tool = mk_tool(schema_ext11, [], hints=[mpiReq, containerReq])
360-
clt = CommandLineTool(tool, lc)
361361
clt.make_job_runner(rc)

0 commit comments

Comments
 (0)