diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-03-14 18:21:58 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-03-14 18:21:58 +0100 |
commit | ddc0472752bba12417f3e2f1e48fdf7fd63f1c9e (patch) | |
tree | 66c20e92abc0c9a32954b2e04cad643a48ebca5e | |
parent | f39a08e99c5a5e10f8d8feddeb85a8c9a33a3ddb (diff) | |
download | cpython-ddc0472752bba12417f3e2f1e48fdf7fd63f1c9e.tar.gz |
Fix test_venv on FreeBSD buildbot
Ignore pip warning in test_venv.test_with_venv().
-rw-r--r-- | Lib/test/test_venv.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py index 28b0f6c3e3..d2c986e71e 100644 --- a/Lib/test/test_venv.py +++ b/Lib/test/test_venv.py @@ -8,6 +8,7 @@ Licensed to the PSF under a contributor agreement. import ensurepip import os import os.path +import re import struct import subprocess import sys @@ -394,7 +395,15 @@ class EnsurePipTest(BaseTest): # We force everything to text, so unittest gives the detailed diff # if we get unexpected results err = err.decode("latin-1") # Force to text, prevent decoding errors - self.assertEqual(err, "") + # Ignore the warning: + # "The directory '$HOME/.cache/pip/http' or its parent directory + # is not owned by the current user and the cache has been disabled. + # Please check the permissions and owner of that directory. If + # executing pip with sudo, you may want sudo's -H flag." + # where $HOME is replaced by the HOME environment variable. + err = re.sub("^The directory .* or its parent directory is not owned " + "by the current user .*$", "", err, flags=re.MULTILINE) + self.assertEqual(err.rstrip(), "") # Being fairly specific regarding the expected behaviour for the # initial bundling phase in Python 3.4. If the output changes in # future pip versions, this test can likely be relaxed further. |