]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix a test in python-test.el
authorTino Calancha <tino.calancha@gmail.com>
Tue, 4 Apr 2017 06:16:15 +0000 (15:16 +0900)
committerTino Calancha <tino.calancha@gmail.com>
Tue, 4 Apr 2017 06:16:15 +0000 (15:16 +0900)
Fix a test that breaks the test suite when it is run within a
virtual environment.
See following link for details:
https://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00857.html
* test/lisp/progmodes/python-tests.el
(python-shell-calculate-process-environment-7): Bind
python-shell-virtualenv-root to VIRTUAL_ENV when this var is set; otherwise
bind it to '/env'.

test/lisp/progmodes/python-tests.el

index 2f4c2fb849dd0e3c3559770d28826d8c1b1fd1d3..3b75e81afeeea2275956c63c9bbdb7cac4d81d81 100644 (file)
@@ -2612,7 +2612,7 @@ Using `python-shell-interpreter' and
   "Test no side-effects on `process-environment'."
   (let* ((python-shell-process-environment
           '("TESTVAR1=value1" "TESTVAR2=value2"))
-         (python-shell-virtualenv-root "/env")
+         (python-shell-virtualenv-root (or (getenv "VIRTUAL_ENV") "/env"))
          (python-shell-unbuffered t)
          (python-shell-extra-pythonpaths'("/path1" "/path2"))
          (original-process-environment (copy-sequence process-environment)))