[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 9e70cd2 40/69: * eglot-tests.el (python-autopep-f

From: João Távora
Subject: [elpa] externals/eglot 9e70cd2 40/69: * eglot-tests.el (python-autopep-formatting): Attempt to fix test.
Date: Sun, 20 Oct 2019 08:21:49 -0400 (EDT)

branch: externals/eglot
commit 9e70cd2c066d5385bb54837631d9e40fc79ced80
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    * eglot-tests.el (python-autopep-formatting): Attempt to fix test.
 eglot-tests.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/eglot-tests.el b/eglot-tests.el
index 60c9f2f..82dfe6c 100644
--- a/eglot-tests.el
+++ b/eglot-tests.el
@@ -453,17 +453,19 @@ Pass TIMEOUT to `eglot--with-timeout'."
 (ert-deftest python-autopep-formatting ()
   "Test formatting in the pyls python LSP.
-pyls prefers autopep over yafp"
+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")))
   (skip-unless (and (executable-find "pyls")
                     (executable-find "autopep8")))
-      '(("project" . (("something.py" . "def a():pass\ndef b():pass"))))
+      '(("project" . (("something.py" . "def a():pass\n\ndef b():pass"))))
         (eglot--find-file-noselect "project/something.py")
       (should (eglot--tests-connect))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]