Source

pip-patches / custom-userbase

Full commit
# HG changeset patch
# Parent 17250062114b72ef018755f2f307e3598139c54a
use a cusom PYTHONUSERBASE for testing --user

diff --git a/tests/test_pip.py b/tests/test_pip.py
--- a/tests/test_pip.py
+++ b/tests/test_pip.py
@@ -294,6 +294,9 @@ class TestPipEnvironment(TestFileEnviron
         assert self.venv == TestPipEnvironment.venv # sanity check
 
         self.site_packages = self.lib/'site-packages'
+        self.user_base = self.lib/'../user'
+        demand_dirs(self.user_base)
+        self.environ["PYTHONUSERBASE"] = self.user_base
 
         # put the test-scratch virtualenv's bin dir first on the PATH
         self.environ['PATH'] = Path.pathsep.join((self.bin_path, self.environ['PATH']))