예제 #1
0
def test_format_command_result__empty_output(caplog, log_level):
    caplog.set_level(log_level)
    actual = wheel.format_command_result(
        command_args=['arg1', 'arg2'],
        command_output='',
    )
    assert actual.splitlines() == [
        "Command arguments: arg1 arg2",
        'Command output: None',
    ]
예제 #2
0
파일: test_wheel.py 프로젝트: pypa/pip
def test_format_command_result__empty_output(caplog, log_level):
    caplog.set_level(log_level)
    actual = wheel.format_command_result(
        command_args=['arg1', 'arg2'],
        command_output='',
    )
    assert actual.splitlines() == [
        "Command arguments: arg1 arg2",
        'Command output: None',
    ]
예제 #3
0
def test_format_command_result__INFO(caplog):
    caplog.set_level(logging.INFO)
    actual = wheel.format_command_result(
        # Include an argument with a space to test argument quoting.
        command_args=['arg1', 'second arg'],
        command_output='output line 1\noutput line 2\n',
    )
    assert actual.splitlines() == [
        "Command arguments: arg1 'second arg'",
        'Command output: [use --verbose to show]',
    ]
예제 #4
0
파일: test_wheel.py 프로젝트: pypa/pip
def test_format_command_result__INFO(caplog):
    caplog.set_level(logging.INFO)
    actual = wheel.format_command_result(
        # Include an argument with a space to test argument quoting.
        command_args=['arg1', 'second arg'],
        command_output='output line 1\noutput line 2\n',
    )
    assert actual.splitlines() == [
        "Command arguments: arg1 'second arg'",
        'Command output: [use --verbose to show]',
    ]
예제 #5
0
def test_format_command_result__DEBUG(caplog, command_output):
    caplog.set_level(logging.DEBUG)
    actual = wheel.format_command_result(
        command_args=['arg1', 'arg2'],
        command_output=command_output,
    )
    assert actual.splitlines() == [
        "Command arguments: arg1 arg2",
        'Command output:',
        'output line 1',
        'output line 2',
        '----------------------------------------',
    ]
예제 #6
0
파일: test_wheel.py 프로젝트: pypa/pip
def test_format_command_result__DEBUG(caplog, command_output):
    caplog.set_level(logging.DEBUG)
    actual = wheel.format_command_result(
        command_args=['arg1', 'arg2'],
        command_output=command_output,
    )
    assert actual.splitlines() == [
        "Command arguments: arg1 arg2",
        'Command output:',
        'output line 1',
        'output line 2',
        '----------------------------------------',
    ]