]> git.eshelyaron.com Git - emacs.git/commitdiff
; Adjust eglot test to recent autopep8/pycodestyle
authorStefan Kangas <stefankangas@gmail.com>
Mon, 12 Dec 2022 21:44:55 +0000 (22:44 +0100)
committerStefan Kangas <stefankangas@gmail.com>
Mon, 12 Dec 2022 21:44:55 +0000 (22:44 +0100)
* test/lisp/progmodes/eglot-tests.el (python-autopep-formatting):
Support more recent autopep8/pycodestyle.

test/lisp/progmodes/eglot-tests.el

index 32eefd778fefaf0d2cb09df4fc36ba69da137047..04ecd7891ab29d06351dbbf4d838a6c8548a8f7d 100644 (file)
@@ -673,7 +673,9 @@ pylsp prefers autopep over yafp, despite its README stating the contrary."
       (eglot-format (line-beginning-position) (line-end-position))
       (should (looking-at "ss"))
       (should
-       (string= (buffer-string) "def a():pass\n\n\ndef b(): pass\n"))
+       (or (string= (buffer-string) "def a():pass\n\n\ndef b(): pass\n")
+           ;; autopep8 2.0.0 (pycodestyle: 2.9.1)
+           (string= (buffer-string) "def a():pass\n\ndef b(): pass")))
       ;; now format the whole buffer
       (eglot-format-buffer)
       (should