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"
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"
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"
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
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
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'
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")
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")
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")
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")
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'