diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2013-12-23 06:16:07 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2013-12-23 06:16:07 (GMT) |
commit | 6256fcbc97e0b1a1e0df1972221232b3a78dff18 (patch) | |
tree | e901b7ff5795dfb5fbaffb2483d99fbaea91f851 /Lib/test/test_ensurepip.py | |
parent | 3f122d6f44d2cdf0a806fa8019d58ea24cfdf070 (diff) | |
download | cpython-6256fcbc97e0b1a1e0df1972221232b3a78dff18.zip cpython-6256fcbc97e0b1a1e0df1972221232b3a78dff18.tar.gz cpython-6256fcbc97e0b1a1e0df1972221232b3a78dff18.tar.bz2 |
Close #19734: ignore pip env vars in ensurepip
Diffstat (limited to 'Lib/test/test_ensurepip.py')
-rw-r--r-- | Lib/test/test_ensurepip.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_ensurepip.py b/Lib/test/test_ensurepip.py index c119327..8c125bf 100644 --- a/Lib/test/test_ensurepip.py +++ b/Lib/test/test_ensurepip.py @@ -126,6 +126,14 @@ class TestBootstrap(unittest.TestCase): ensurepip.bootstrap(altinstall=True, default_pip=True) self.run_pip.assert_not_called() + def test_pip_environment_variables_removed(self): + # ensurepip deliberately ignores all pip environment variables + # See http://bugs.python.org/issue19734 for details + self.os_environ["PIP_THIS_SHOULD_GO_AWAY"] = "test fodder" + ensurepip.bootstrap() + self.assertNotIn("PIP_THIS_SHOULD_GO_AWAY", self.os_environ) + + @contextlib.contextmanager def fake_pip(version=ensurepip._PIP_VERSION): if version is None: |