コード例 #1
0
def test_integration(input_s, expected_retval, output, tmpdir):
    path = tmpdir.join('file.txt')
    path.write_binary(input_s)

    output_retval = fix_requirements_txt([path.strpath])

    assert path.read_binary() == output
    assert output_retval == expected_retval
コード例 #2
0
def test_integration(input_s, expected_retval, output, tmpdir):
    path = os.path.join(tmpdir.strpath, 'file.txt')

    with open(path, 'wb') as file_obj:
        file_obj.write(input_s)

    assert fix_requirements_txt([path]) == expected_retval
    assert open(path, 'rb').read() == output
コード例 #3
0
def test_integration(input_s, expected_retval, output, tmpdir):
    path = tmpdir.join('file.txt')
    path.write_binary(input_s)

    output_retval = fix_requirements_txt([path.strpath])

    assert path.read_binary() == output
    assert output_retval == expected_retval
コード例 #4
0
def test_integration(input_s, expected_retval, output, tmpdir):
    path = os.path.join(tmpdir.strpath, 'file.txt')

    with open(path, 'wb') as file_obj:
        file_obj.write(input_s)

    assert fix_requirements_txt([path]) == expected_retval
    assert open(path, 'rb').read() == output