Merge from emacs-26
e62ad04963
Fix sgml-mode handling of quotes within parens (Bug#36347)06b35b2f92
; * lisp/frame.el: Enhance add-variable-watcher commentary.572e34bb6f
Rename 'make-symbolic-link' argument NEWNAME to LINKNAME04477adedc
Check that length of data returned by sysctl is non-zero81535eeadb
* test/lisp/progmodes/python-tests.el (python-virt-bin): D...9d48979ca8
Fix Python tests depending on system-typefcf6cc3177
Fix problem with wdired test when symlinks cannot be created.4701e0663e
Improve wording of documentation of click events # Conflicts: # lisp/textmodes/sgml-mode.el # test/lisp/textmodes/sgml-mode-tests.el
This commit is contained in:
commit
9552ee4df7
10 changed files with 78 additions and 55 deletions
|
@ -134,6 +134,16 @@ default to `point-min' and `point-max' respectively."
|
|||
(overlay-end overlay))))
|
||||
(buffer-substring-no-properties (point-min) (point-max)))))
|
||||
|
||||
(defun python-virt-bin (&optional virt-root)
|
||||
"Return the virtualenv bin dir, starting from VIRT-ROOT.
|
||||
If nil, VIRT-ROOT defaults to `python-shell-virtualenv-root'.
|
||||
The name of this directory depends on `system-type'."
|
||||
(expand-file-name
|
||||
(concat
|
||||
(file-name-as-directory (or virt-root
|
||||
python-shell-virtualenv-root))
|
||||
(if (eq system-type 'windows-nt) "Scripts" "bin"))))
|
||||
|
||||
|
||||
;;; Tests for your tests, so you can test while you test.
|
||||
|
||||
|
@ -2704,7 +2714,7 @@ if x:
|
|||
(python-shell-virtualenv-root "/env")
|
||||
(new-exec-path (python-shell-calculate-exec-path)))
|
||||
(should (equal new-exec-path
|
||||
(list (expand-file-name "/env/bin") "/path0")))))
|
||||
(list (python-virt-bin) "/path0")))))
|
||||
|
||||
(ert-deftest python-shell-calculate-exec-path-3 ()
|
||||
"Test complete `python-shell-virtualenv-root' modification."
|
||||
|
@ -2713,7 +2723,7 @@ if x:
|
|||
(python-shell-virtualenv-root "/env")
|
||||
(new-exec-path (python-shell-calculate-exec-path)))
|
||||
(should (equal new-exec-path
|
||||
(list (expand-file-name "/env/bin")
|
||||
(list (python-virt-bin)
|
||||
"/path1" "/path2" "/path0")))))
|
||||
|
||||
(ert-deftest python-shell-calculate-exec-path-4 ()
|
||||
|
@ -2724,7 +2734,7 @@ if x:
|
|||
(python-shell-virtualenv-root "/env")
|
||||
(new-exec-path (python-shell-calculate-exec-path)))
|
||||
(should (equal new-exec-path
|
||||
(list (expand-file-name "/env/bin")
|
||||
(list (python-virt-bin)
|
||||
"/path1" "/path2" "/path0")))))
|
||||
|
||||
(ert-deftest python-shell-calculate-exec-path-5 ()
|
||||
|
@ -2754,7 +2764,7 @@ if x:
|
|||
(python-shell-virtualenv-root "/env"))
|
||||
(python-shell-with-environment
|
||||
(should (equal exec-path
|
||||
(list (expand-file-name "/env/bin")
|
||||
(list (python-virt-bin)
|
||||
"/path1" "/path2" "/path0")))
|
||||
(should (not (getenv "PYTHONHOME")))
|
||||
(should (string= (getenv "VIRTUAL_ENV") "/env")))
|
||||
|
@ -2770,7 +2780,7 @@ if x:
|
|||
(python-shell-virtualenv-root "/env"))
|
||||
(python-shell-with-environment
|
||||
(should (equal (python-shell-calculate-exec-path)
|
||||
(list (expand-file-name "/env/bin")
|
||||
(list (python-virt-bin)
|
||||
"/path1" "/path2" "/remote1" "/remote2")))
|
||||
(let ((process-environment (python-shell-calculate-process-environment)))
|
||||
(should (not (getenv "PYTHONHOME")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue