[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 254fee0 46/69: Use more pyls and less rls in test
From: |
João Távora |
Subject: |
[elpa] externals/eglot 254fee0 46/69: Use more pyls and less rls in tests |
Date: |
Sun, 20 Oct 2019 08:21:50 -0400 (EDT) |
branch: externals/eglot
commit 254fee0c2d011eb4dbabbedd3444ee5f8ece84cb
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Use more pyls and less rls in tests
Except where needed, use pyls as the test server. Much easier to
install than rls, and I haven't been coding much rust anyway.
* eglot-tests.el (auto-detect-running-server): Use pyls.
(auto-reconnect): Use pyls.
(basic-diagnostics): Rename from rls-basic-diagnostics. Use pyls.
(rename-a-symbol): Rename from rls-rename. Use pyls.
---
eglot-tests.el | 54 ++++++++++++++++++++++++++----------------------------
1 file changed, 26 insertions(+), 28 deletions(-)
diff --git a/eglot-tests.el b/eglot-tests.el
index d61537d..6a544d9 100644
--- a/eglot-tests.el
+++ b/eglot-tests.el
@@ -274,22 +274,22 @@ Pass TIMEOUT to `eglot--with-timeout'."
(ert-deftest auto-detect-running-server ()
"Visit a file and M-x eglot, then visit a neighbour. "
- (skip-unless (executable-find "rls"))
+ (skip-unless (executable-find "pyls"))
(let (server)
(eglot--with-fixture
- '(("project" . (("coiso.rs" . "bla")
- ("merdix.rs" . "bla")))
- ("anotherproject" . (("cena.rs" . "bla"))))
+ '(("project" . (("coiso.py" . "bla")
+ ("merdix.py" . "bla")))
+ ("anotherproject" . (("cena.py" . "bla"))))
(with-current-buffer
- (eglot--find-file-noselect "project/coiso.rs")
+ (eglot--find-file-noselect "project/coiso.py")
(should (setq server (eglot--tests-connect)))
(should (eglot--current-server)))
(with-current-buffer
- (eglot--find-file-noselect "project/merdix.rs")
+ (eglot--find-file-noselect "project/merdix.py")
(should (eglot--current-server))
(should (eq (eglot--current-server) server)))
(with-current-buffer
- (eglot--find-file-noselect "anotherproject/cena.rs")
+ (eglot--find-file-noselect "anotherproject/cena.py")
(should-error (eglot--current-server-or-lose))))))
(ert-deftest auto-shutdown ()
@@ -313,13 +313,13 @@ Pass TIMEOUT to `eglot--with-timeout'."
(ert-deftest auto-reconnect ()
"Start a server. Kill it. Watch it reconnect."
- (skip-unless (executable-find "rls"))
+ (skip-unless (executable-find "pyls"))
(let (server (eglot-autoreconnect 1))
(eglot--with-fixture
- '(("project" . (("coiso.rs" . "bla")
- ("merdix.rs" . "bla"))))
+ '(("project" . (("coiso.py" . "bla")
+ ("merdix.py" . "bla"))))
(with-current-buffer
- (eglot--find-file-noselect "project/coiso.rs")
+ (eglot--find-file-noselect "project/coiso.py")
(should (setq server (eglot--tests-connect)))
;; In 1.2 seconds > `eglot-autoreconnect' kill servers. We
;; should have a automatic reconnection.
@@ -370,15 +370,14 @@ Pass TIMEOUT to `eglot--with-timeout'."
(and (string= (eglot--path-to-uri "Cargo.toml") uri)
(= type 3))))))))))
-(ert-deftest rls-basic-diagnostics ()
- "Test basic diagnostics in RLS."
- (skip-unless (executable-find "rls"))
- (skip-unless (executable-find "cargo"))
+(ert-deftest basic-diagnostics ()
+ "Test basic diagnostics."
+ (skip-unless (executable-find "pyls"))
(eglot--with-fixture
- '(("diag-project" . (("main.rs" . "fn main() {\nprintfoo!(\"Hello,
world!\");\n}"))))
+ '(("diag-project" .
+ (("main.py" . "def foo(): if True pass")))) ; colon missing after True
(with-current-buffer
- (eglot--find-file-noselect "diag-project/main.rs")
- (should (zerop (shell-command "cargo init")))
+ (eglot--find-file-noselect "diag-project/main.py")
(eglot--sniffing (:server-notifications s-notifs)
(eglot--tests-connect)
(eglot--wait-for (s-notifs 2)
@@ -423,21 +422,20 @@ Pass TIMEOUT to `eglot--with-timeout'."
(&key id &allow-other-keys)
(eq id pending-id)))))))
-(ert-deftest rls-rename ()
- "Test renaming in RLS."
- (skip-unless (executable-find "rls"))
- (skip-unless (executable-find "cargo"))
+(ert-deftest rename-a-symbol ()
+ "Test basic symbol renaming"
+ (skip-unless (executable-find "pyls"))
(eglot--with-fixture
'(("rename-project"
- . (("main.rs" .
- "fn test() -> i32 { let test=3; return test; }"))))
+ . (("main.py" .
+ "def foo (bar) : 1 + bar\n\ndef bar() : pass"))))
(with-current-buffer
- (eglot--find-file-noselect "rename-project/main.rs")
- (should (zerop (shell-command "cargo init")))
+ (eglot--find-file-noselect "rename-project/main.py")
(eglot--tests-connect)
- (goto-char (point-min)) (search-forward "return te")
+ (goto-char (point-min)) (search-forward "bar")
(eglot-rename "bla")
- (should (equal (buffer-string) "fn test() -> i32 { let bla=3; return
bla; }")))))
+ (should (equal (buffer-string)
+ "def foo (bla) : 1 + bla\n\ndef bar() : pass")))))
(ert-deftest basic-completions ()
"Test basic autocompletion in a python LSP"
- [elpa] externals/eglot 36b7cf32 38/69: Fix #272: also use signature label offsets for parameter info, (continued)
- [elpa] externals/eglot 36b7cf32 38/69: Fix #272: also use signature label offsets for parameter info, João Távora, 2019/10/20
- [elpa] externals/eglot 059ea59 43/69: Optionally shutdown after killing last buffer of managed project (#309), João Távora, 2019/10/20
- [elpa] externals/eglot 59ba0b1 39/69: New README section on how to best report bugs to Eglot, João Távora, 2019/10/20
- [elpa] externals/eglot ce983d1 47/69: Revert "Treat null/nil server capabilities as false", João Távora, 2019/10/20
- [elpa] externals/eglot 4693abf 50/69: Fix #258: Allow user to set idle time to wait before processing changes, João Távora, 2019/10/20
- [elpa] externals/eglot 14ab804 54/69: Fix #318: unbreak xref-find-definitions, João Távora, 2019/10/20
- [elpa] externals/eglot dbb5dd4 57/69: Slightly more robust completion tests, João Távora, 2019/10/20
- [elpa] externals/eglot 3604173 64/69: Unbreak eglot--setq-saving if symbol is unbound, João Távora, 2019/10/20
- [elpa] externals/eglot a11a41b 63/69: Use of company-capf backend in eglot-managed buffers, João Távora, 2019/10/20
- [elpa] externals/eglot 6e93622 27/69: Fix #273: leniently handle invalid positions sent by some servers, João Távora, 2019/10/20
- [elpa] externals/eglot 254fee0 46/69: Use more pyls and less rls in tests,
João Távora <=
- [elpa] externals/eglot 0e5e08d 51/69: Support goto-{declaration, implementation, typeDefinition}, João Távora, 2019/10/20
- [elpa] externals/eglot 5a21670 59/69: Fix bug in workspace/didChangeWatchedfiles, João Távora, 2019/10/20
- [elpa] externals/eglot 9359c15 58/69: Close #316: add support for the Ada Language Server, João Távora, 2019/10/20
- [elpa] externals/eglot d6508e0 29/69: Fix #273: fix a typo, João Távora, 2019/10/20
- [elpa] externals/eglot 28ecd5d 34/69: Change the default of eglot-move-to-column-function, João Távora, 2019/10/20
- [elpa] externals/eglot 7a70c97 33/69: Require array package to use current-line (#294), João Távora, 2019/10/20
- [elpa] externals/eglot f7a1bf6 49/69: Fix #236: much less noisy mode line, João Távora, 2019/10/20
- [elpa] externals/eglot 4c5d0d4 53/69: Misc improvements to the xref glue code, João Távora, 2019/10/20
- [elpa] externals/eglot 5ea4049 68/69: Fix #324: let user keep control of some variables during Eglot sessions, João Távora, 2019/10/20
- [elpa] externals/eglot 33a4f86 69/69: * eglot.el (Version): Bump to 1.5, João Távora, 2019/10/20