[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/elpa 73bc752 11/71: Close #441: shield tests from some
From: |
João Távora |
Subject: |
[elpa] externals/elpa 73bc752 11/71: Close #441: shield tests from some user customizations |
Date: |
Wed, 16 Dec 2020 11:42:15 -0500 (EST) |
branch: externals/elpa
commit 73bc752e2f194a17d076c1bc5efd5dba473b0e40
Author: Tobias Rittweiler <trittweiler@gmail.com>
Commit: GitHub <noreply@github.com>
Close #441: shield tests from some user customizations
Users' customization of Python indenting style in the standard
XDG_CONFIG_HOME location of ~/.config/pycodestyle could cause spurious
test failures. We prevent this and similar problems by overriding that
environment variable in tests. If this turns out to hurt other language
servers used in the test suite, we'll have to revisit.
Co-authored-by: João Távora <joaotavora@gmail.com>
* eglot-tests.el (eglot--call-with-fixture): Temporarily set
XDG_CONFIG_HOME to /dev/null.
(python-autopep-formatting): Remove conditional on
TRAVIS_TESTING.
---
eglot-tests.el | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/eglot-tests.el b/eglot-tests.el
index faf0e16..ea5a9cd 100644
--- a/eglot-tests.el
+++ b/eglot-tests.el
@@ -84,7 +84,11 @@ then restored."
(set (car spec) (cadr spec)))
((stringp (car spec)) (push spec file-specs))))
(unwind-protect
- (let ((eglot-server-initialized-hook
+ (let ((process-environment
+ ;; Prevent user-configuration to have an influence on
+ ;; language servers. (See github#441)
+ (cons "XDG_CONFIG_HOME=/dev/null" process-environment))
+ (eglot-server-initialized-hook
(lambda (server) (push server new-servers))))
(setq created-files (mapcan #'eglot--make-file-or-dir file-specs))
(prog1 (funcall fn)
@@ -572,14 +576,8 @@ def foobazquuz(d, e, f): pass
(ert-deftest python-autopep-formatting ()
"Test formatting in the pyls python LSP.
pyls prefers autopep over yafp, despite its README stating the contrary."
- ;; For some reason Travis will fail the part of the test where we
- ;; try to reformat just the second line, i.e. it will _not_ add
- ;; newlines before the region we asked to reformat. I actually
- ;; think Travis' behaviour is more sensible, but I don't know how to
- ;; reproduce it locally. Must be some Python version thing.
- ;; Beware, this test is brittle if ~/.config/pycodestyle exists, or
- ;; default autopep rules change, which has happened.
- (skip-unless (null (getenv "TRAVIS_TESTING")))
+ ;; Beware, default autopep rules can change over time, which may
+ ;; affect this test.
(skip-unless (and (executable-find "pyls")
(executable-find "autopep8")))
(eglot--with-fixture
- [elpa] externals/elpa 487cde5 18/71: Close #443: kind of honour eldoc-echo-area-use-multiline-p, (continued)
- [elpa] externals/elpa 487cde5 18/71: Close #443: kind of honour eldoc-echo-area-use-multiline-p, João Távora, 2020/12/16
- [elpa] externals/elpa 22aa27c 01/71: Close #397: Simplify a bit of code, João Távora, 2020/12/16
- [elpa] externals/elpa 8900a35 04/71: Prevent "Cant guess python-indent-offset..." messages in tests, João Távora, 2020/12/16
- [elpa] externals/elpa dd48f4a 08/71: * eglot.el (eglot-put-doc-in-help-buffer): Tiny docstring fix., João Távora, 2020/12/16
- [elpa] externals/elpa e5cf30e 09/71: Close #435: create match xrefs when possible, João Távora, 2020/12/16
- [elpa] externals/elpa ad3f049 24/71: Close #417: minimally document relation with project.el, João Távora, 2020/12/16
- [elpa] externals/elpa 2f75da2 28/71: Fix #460: fix "free variable" warning, João Távora, 2020/12/16
- [elpa] externals/elpa 0f57efb 26/71: Simplify bug-reporting instructions, João Távora, 2020/12/16
- [elpa] externals/elpa 91a7cba 33/71: Fix #474, #478: prompt for executable if supplied name does not exist, João Távora, 2020/12/16
- [elpa] externals/elpa 9efe207 05/71: Make curl invocation fail more explicitly in .travis.yml, João Távora, 2020/12/16
- [elpa] externals/elpa 73bc752 11/71: Close #441: shield tests from some user customizations,
João Távora <=
- [elpa] externals/elpa b6519a5 16/71: Per #446: Add tests for eglot-server-programs, João Távora, 2020/12/16
- [elpa] externals/elpa 9bc58df 17/71: Fix #446: unbreak eglot--guess-contact for host-and-port case, João Távora, 2020/12/16
- [elpa] externals/elpa 197984c 27/71: Remove trailing whitespaces, João Távora, 2020/12/16
- [elpa] externals/elpa a0249c8 23/71: Per #437: remap display-local-help (C-h .) to eglot-help-at-point, João Távora, 2020/12/16
- [elpa] externals/elpa ee87519 41/71: Replace uses of project-roots with project-root, João Távora, 2020/12/16
- [elpa] externals/elpa 3b01561 39/71: Close #459: rework computation of string given to Eldoc (again), João Távora, 2020/12/16
- [elpa] externals/elpa bf75312 35/71: Require Xref, Project and Eldoc from GNU ELPA, João Távora, 2020/12/16
- [elpa] externals/elpa 2b16952 44/71: Try to make hover-multiline-doc-locus test pass on Travis, João Távora, 2020/12/16
- [elpa] externals/elpa ac9239b 46/71: Fix small problems around Eglot's help buffer, João Távora, 2020/12/16
- [elpa] externals/elpa 433779d 49/71: * eglot.el (Package-Requires): Require Flymake 1.0.9 and eldoc 1.2.0, João Távora, 2020/12/16