Expect deprecation warning for build_dir in tests

This commit is contained in:
Tzu-ping Chung 2020-06-23 20:14:29 +08:00
parent acab2ee54e
commit da23209fbe
2 changed files with 12 additions and 0 deletions

View File

@ -41,8 +41,14 @@ def test_cleanup_prevented_upon_build_dir_exception(
'--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)

View File

@ -252,8 +252,14 @@ def test_pip_wheel_fail_cause_of_previous_build_dir(
'simple==3.0',
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
# Then I see that the error code is the right one
if not use_new_resolver:
assert result.returncode == PREVIOUS_BUILD_DIR_ERROR, result