Not clear why this didn't fail before...

This commit is contained in:
Paul Moore 2020-10-27 15:44:17 +00:00
parent 0c2a2bc803
commit 52e1c9a39c
1 changed files with 0 additions and 35 deletions

View File

@ -1,10 +1,7 @@
import os
from os.path import exists
import pytest
from pip._internal.cli.status_codes import PREVIOUS_BUILD_DIR_ERROR
@pytest.mark.network
@pytest.mark.xfail(
@ -26,38 +23,6 @@ def test_no_clean_option_blocks_cleaning_after_install(script, data):
assert exists(build)
@pytest.mark.network
def test_cleanup_prevented_upon_build_dir_exception(
script,
data,
use_new_resolver,
):
"""
Test no cleanup occurs after a PreviousBuildDirError
"""
build = script.venv_path / 'build'
build_simple = build / 'simple'
os.makedirs(build_simple)
build_simple.joinpath("setup.py").write_text("#")
result = script.pip(
'install', '-f', data.find_links, '--no-index', 'simple',
'--build', build,
expect_error=(not use_new_resolver),
expect_temp=(not use_new_resolver),
expect_stderr=True,
)
assert (
"The -b/--build/--build-dir/--build-directory "
"option is deprecated."
) in result.stderr
if not use_new_resolver:
assert result.returncode == PREVIOUS_BUILD_DIR_ERROR, str(result)
assert "pip can't proceed" in result.stderr, str(result)
assert exists(build_simple), str(result)
@pytest.mark.network
def test_pep517_no_legacy_cleanup(script, data, with_wheel):
"""Test a PEP 517 failed build does not attempt a legacy cleanup"""