Esempio n. 1
0
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'])
Esempio n. 2
0
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'])
Esempio n. 3
0
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'])
Esempio n. 4
0
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'])
Esempio n. 5
0
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'])
Esempio n. 6
0
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'])
Esempio n. 7
0
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'])
Esempio n. 8
0
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'])
Esempio n. 9
0
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'])
Esempio n. 10
0
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'])