[Python-checkins] cpython (3.5): Fix test_venv on FreeBSD buildbot
victor.stinner
python-checkins at python.org
Mon Mar 14 13:22:54 EDT 2016
https://hg.python.org/cpython/rev/496e419860de
changeset: 100534:496e419860de
branch: 3.5
parent: 100529:0a583e60c406
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Mar 14 18:21:58 2016 +0100
summary:
Fix test_venv on FreeBSD buildbot
Ignore pip warning in test_venv.test_with_venv().
files:
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
--- a/Lib/test/test_venv.py
+++ b/Lib/test/test_venv.py
@@ -8,6 +8,7 @@
import ensurepip
import os
import os.path
+import re
import struct
import subprocess
import sys
@@ -394,7 +395,15 @@
# 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.
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list