FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
docker-python/tests/test_jupyterlab_lsp.py at rapture · maxmet91/docker-python · GitHub
maxmet91
docker-python
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
docker-python
/
tests
/
test_jupyterlab_lsp.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
31 lines (25 loc) · 1.05 KB
Breadcrumbs
docker-python
/
tests
/
test_jupyterlab_lsp.py
Copy path
File metadata and controls
31 lines (25 loc) · 1.05 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import
os
import
unittest
from
jupyter_server
.
serverapp
import
ServerApp
# Adapted from:
# https://github.com/jupyter-lsp/jupyterlab-lsp/blob/ce76fab170feea506faf9ef47e4bd6a468c24313/python_packages/jupyter_lsp/jupyter_lsp/tests/test_extension.py
class
TestJupyterLabLsp
(
unittest
.
TestCase
):
def
test_serverextension_path
(
self
):
import
jupyter_lsp
paths
=
jupyter_lsp
.
_jupyter_server_extension_paths
()
for
path
in
paths
:
self
.
assertTrue
(
__import__
(
path
[
"module"
]))
def
test_serverextension
(
self
):
app
=
ServerApp
()
app
.
initialize
(
[
"--ServerApp.jpserver_extensions={'jupyter_lsp.serverextension': True}"
],
new_httpserver
=
False
,
)
self
.
assertTrue
(
app
.
language_server_manager
)
found_lsp
=
False
for
r
in
app
.
web_app
.
default_router
.
rules
:
for
rr
in
r
.
target
.
rules
:
if
"/lsp/"
in
str
(
rr
.
matcher
.
regex
):
found_lsp
=
True
self
.
assertTrue
(
found_lsp
,
"didn't install the /lsp/ route"
)
app
.
stop
()
Back
|
FazBrowse Home
|
New Git URL