mirror of https://github.com/pypa/pip
Expect deprecation warning for build_dir in tests
This commit is contained in:
parent
acab2ee54e
commit
da23209fbe
|
@ -41,8 +41,14 @@ def test_cleanup_prevented_upon_build_dir_exception(
|
||||||
'--build', build,
|
'--build', build,
|
||||||
expect_error=(not use_new_resolver),
|
expect_error=(not use_new_resolver),
|
||||||
expect_temp=(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:
|
if not use_new_resolver:
|
||||||
assert result.returncode == PREVIOUS_BUILD_DIR_ERROR, str(result)
|
assert result.returncode == PREVIOUS_BUILD_DIR_ERROR, str(result)
|
||||||
assert "pip can't proceed" in result.stderr, str(result)
|
assert "pip can't proceed" in result.stderr, str(result)
|
||||||
|
|
|
@ -252,8 +252,14 @@ def test_pip_wheel_fail_cause_of_previous_build_dir(
|
||||||
'simple==3.0',
|
'simple==3.0',
|
||||||
expect_error=(not use_new_resolver),
|
expect_error=(not use_new_resolver),
|
||||||
expect_temp=(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
|
||||||
|
|
||||||
# Then I see that the error code is the right one
|
# Then I see that the error code is the right one
|
||||||
if not use_new_resolver:
|
if not use_new_resolver:
|
||||||
assert result.returncode == PREVIOUS_BUILD_DIR_ERROR, result
|
assert result.returncode == PREVIOUS_BUILD_DIR_ERROR, result
|
||||||
|
|
Loading…
Reference in New Issue