def test_call_with_parser_success(mock_sub, capsys):
    "Parser returns expected portion of check_output's output."
    output = mock_sub.parse_output(second_line_parser, ['hello', 'world'])
    mock_sub._subprocess.check_output.assert_called_with(['hello', 'world'], text=True)
    assert (output == 'more output line 2')
Parser returns expected portion of check_output's output.
def test_call_with_parser_success(mock_sub, capsys):
    
    output = mock_sub.parse_output(second_line_parser, ['hello', 'world'])
    mock_sub._subprocess.check_output.assert_called_with(['hello', 'world'], text=True)
    assert (output == 'more output line 2')