Example #1
0
 def test_redefined_args(self):
     runtime_context = RuntimeContext()
     runtime_context.use_container = False
     runtime_context.on_error = "continue"
     f = cwltool.factory.Factory(runtime_context=runtime_context)
     assert f.runtime_context.use_container is False
     assert f.runtime_context.on_error == "continue"
Example #2
0
 def test_redefined_args(self):
     runtime_context = RuntimeContext()
     runtime_context.use_container = False
     runtime_context.on_error = "continue"
     f = cwltool.factory.Factory(runtime_context=runtime_context)
     assert f.runtime_context.use_container is False
     assert f.runtime_context.on_error == "continue"
Example #3
0
def test_factory_redefined_args() -> None:
    runtime_context = RuntimeContext()
    runtime_context.use_container = False
    runtime_context.on_error = "continue"
    factory = cwltool.factory.Factory(runtime_context=runtime_context)

    assert factory.runtime_context.use_container is False
    assert factory.runtime_context.on_error == "continue"
Example #4
0
def test_factory_partial_output():
    runtime_context = RuntimeContext()
    runtime_context.on_error = "continue"
    factory = cwltool.factory.Factory(runtime_context=runtime_context)

    with pytest.raises(cwltool.factory.WorkflowStatus) as err_info:
        factory.make(get_data("tests/wf/wffail.cwl"))()

    err = err_info.value
    assert err.out["out1"]["checksum"] == 'sha1$e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e'
    assert err.out["out2"] is None
Example #5
0
def test_factory_partial_output():
    runtime_context = RuntimeContext()
    runtime_context.on_error = "continue"
    factory = cwltool.factory.Factory(runtime_context=runtime_context)

    with pytest.raises(cwltool.factory.WorkflowStatus) as err_info:
        factory.make(get_data("tests/wf/wffail.cwl"))()

    err = err_info.value
    assert err.out["out1"][
        "checksum"] == 'sha1$e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e'
    assert err.out["out2"] is None
Example #6
0
def test_factory_partial_scatter():
    runtime_context = RuntimeContext()
    runtime_context.on_error = "continue"
    factory = cwltool.factory.Factory(runtime_context=runtime_context)

    with pytest.raises(cwltool.factory.WorkflowStatus) as err_info:
        factory.make(get_data("tests/wf/scatterfail.cwl"))()

    err = err_info.value
    assert err.out["out"][0]["checksum"] == 'sha1$e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e'
    assert err.out["out"][1] is None
    assert err.out["out"][2]["checksum"] == 'sha1$a3db5c13ff90a36963278c6a39e4ee3c22e2a436'
Example #7
0
 def test_partial_output(self):
     runtime_context = RuntimeContext()
     runtime_context.on_error = "continue"
     f = cwltool.factory.Factory(runtime_context=runtime_context)
     fail = f.make(get_data("tests/wf/wffail.cwl"))
     try:
         fail()
     except cwltool.factory.WorkflowStatus as e:
         self.assertEquals('sha1$e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e', e.out["out1"]["checksum"])
         self.assertIsNone(e.out["out2"])
     else:
         self.fail("Should have raised WorkflowStatus")
Example #8
0
 def test_partial_output(self):
     runtime_context = RuntimeContext()
     runtime_context.on_error = "continue"
     f = cwltool.factory.Factory(runtime_context=runtime_context)
     fail = f.make(get_data("tests/wf/wffail.cwl"))
     try:
         fail()
     except cwltool.factory.WorkflowStatus as e:
         self.assertEquals('sha1$e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e', e.out["out1"]["checksum"])
         self.assertIsNone(e.out["out2"])
     else:
         self.fail("Should have raised WorkflowStatus")
Example #9
0
 def test_partial_scatter(self):
     runtime_context = RuntimeContext()
     runtime_context.on_error = "continue"
     f = cwltool.factory.Factory(runtime_context=runtime_context)
     fail = f.make(get_data("tests/wf/scatterfail.cwl"))
     try:
         fail()
     except cwltool.factory.WorkflowStatus as e:
         self.assertEquals('sha1$e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e', e.out["out"][0]["checksum"])
         self.assertIsNone(e.out["out"][1])
         self.assertEquals('sha1$a3db5c13ff90a36963278c6a39e4ee3c22e2a436', e.out["out"][2]["checksum"])
     else:
         self.fail("Should have raised WorkflowStatus")
Example #10
0
 def test_partial_scatter(self):
     runtime_context = RuntimeContext()
     runtime_context.on_error = "continue"
     f = cwltool.factory.Factory(runtime_context=runtime_context)
     fail = f.make(get_data("tests/wf/scatterfail.cwl"))
     try:
         fail()
     except cwltool.factory.WorkflowStatus as e:
         self.assertEquals('sha1$e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e', e.out["out"][0]["checksum"])
         self.assertIsNone(e.out["out"][1])
         self.assertEquals('sha1$a3db5c13ff90a36963278c6a39e4ee3c22e2a436', e.out["out"][2]["checksum"])
     else:
         self.fail("Should have raised WorkflowStatus")
Example #11
0
def test_factory_partial_scatter():
    runtime_context = RuntimeContext()
    runtime_context.on_error = "continue"
    factory = cwltool.factory.Factory(runtime_context=runtime_context)

    with pytest.raises(cwltool.factory.WorkflowStatus) as err_info:
        factory.make(get_data("tests/wf/scatterfail.cwl"))()

    err = err_info.value
    assert err.out["out"][0][
        "checksum"] == 'sha1$e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e'
    assert err.out["out"][1] is None
    assert err.out["out"][2][
        "checksum"] == 'sha1$a3db5c13ff90a36963278c6a39e4ee3c22e2a436'