def test_fail_handler_stopstepgroup_multi(): """Failure handler with StopStepGroup exits pypyr with no exception. Only calls 1st group in call. """ pipename = 'errors/fail-handler-stopstepgroup-multi' test_pipe_runner.assert_pipeline_notify_output_is(pipename, ['A', 'B', 'C'])
def test_fail_handler_stop_call_on_failure_fallback(): """Failure handler with Stop exits pypyr with no exception. Only calls 1st group in call. Call with no failure handler falls back to default on_failure on pipeline level. """ pipename = 'errors/fail-handler-stop-call-on-failure-fallback' test_pipe_runner.assert_pipeline_notify_output_is(pipename, ['A', 'B'])
def test_fail_handler_stoppipeline_pype_nested(): """Failure handler can call to other pipelines and still stop. Parent pipeline has its own failure-handler, which can also stop. """ pipename = 'errors/fail-handler-stoppipeline-pype-nested' test_pipe_runner.assert_pipeline_notify_output_is( pipename, ['A.parent', 'A', 'B.parent', 'C.parent'])
def test_fail_handler_jump_stop_outside(): """Failure handler can jump to other stepgroups and still stop. Stop Pipeline in jumped to group stops entire pipeline without error. """ pipename = 'errors/fail-handler-jump-stop-outside' test_pipe_runner.assert_pipeline_notify_output_is(pipename, ['A', 'B', 'C'])
def test_fail_handler_call_from_handler_nest_fail_handler_stop(): """Failure handler can call to other stepgroups and still stop. Called step-group has its own failure handler. Can StopStepGroup the called step-group. The outer/parent failure handler DOES have a stop too, so will not raise error. """ pipename = 'errors/fail-handler-call-from-handler-nest-fail-handler-stop' test_pipe_runner.assert_pipeline_notify_output_is( pipename, ['A', 'B', 'C', 'D', 'E', 'F'])
def test_pype_pipearg_int(): """Pype parses pypeArg string and accessible in child.""" pipename = 'pype/pipeargs' test_pipe_runner.assert_pipeline_notify_output_is( pipename, ['A', 'B', 'C', 'C', 'D'])
def test_pype_pyimport(): """Pype while passing pyimports to child.""" pipename = 'pype/pyimport/parent' test_pipe_runner.assert_pipeline_notify_output_is(pipename, ['A', 'B', 'C', 'D'])
def test_pype_err_int(): """Pype calls handles error with pipeline_name correctly.""" pipename = 'pype/pipeerr' test_pipe_runner.assert_pipeline_notify_output_is(pipename, ['A', 'B', 'C'])
def test_error_line_col_no(): """Line + col numbers correct on error.""" pipename = 'errors/line-col-no' test_pipe_runner.assert_pipeline_notify_output_is(pipename, ['done'])
def test_fail_handler_stopstepgroup(): """Failure handler with StopStepGroup exits pypyr with no exception.""" pipename = 'errors/fail-handler-stopstepgroup' test_pipe_runner.assert_pipeline_notify_output_is(pipename, ['A'])