From da23209fbebf46949ca685eb631a572bd19a007c Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Tue, 23 Jun 2020 20:14:29 +0800 Subject: [PATCH] Expect deprecation warning for build_dir in tests --- tests/functional/test_install_cleanup.py | 6 ++++++ tests/functional/test_wheel.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/tests/functional/test_install_cleanup.py b/tests/functional/test_install_cleanup.py index 719c3cc42..c01c47c3e 100644 --- a/tests/functional/test_install_cleanup.py +++ b/tests/functional/test_install_cleanup.py @@ -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) diff --git a/tests/functional/test_wheel.py b/tests/functional/test_wheel.py index 9fcb18032..0b58c9237 100644 --- a/tests/functional/test_wheel.py +++ b/tests/functional/test_wheel.py @@ -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