From 3f013349642cdebccc80c916dd0f2c7826179779 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 12 Nov 2018 13:05:46 -0500 Subject: [PATCH] Add test capturing expectation. Ref #4106. --- tests/functional/test_install.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py index 1be8e10e392..2cc76bb939e 100644 --- a/tests/functional/test_install.py +++ b/tests/functional/test_install.py @@ -1473,3 +1473,19 @@ def test_install_conflict_warning_can_be_suppressed(script, data): 'install', '--no-index', pkgB_path, '--no-warn-conflicts' ) assert "Successfully installed pkgB-2.0" in result2.stdout, str(result2) + + +def test_target_install_ignores_distutils_config_install_prefix(script): + prefix = script.scratch_path / 'prefix' + Path(os.environ['HOME'], '.pydistutils.cfg').write(textwrap.dedent( + ''' + [install] + prefix=%s + ''' % str(prefix))) + target = script.scratch_path / 'target' + result = script.pip_install_local('simplewheel', '-t', target) + assert ( + "Successfully installed simplewheel" in result.stdout and + (target - script.base_path) in result.files_created and + (prefix - script.base_path) not in result.files_created + ), str(result)