test for lab extensions

This commit is contained in:
Jeremy Tuloup
2023-08-01 06:43:49 +00:00
parent b6ee97c770
commit 6f38ec6a95

View File

@@ -21,21 +21,21 @@ def test_serverextensions():
assert e in proc.stderr.decode() assert e in proc.stderr.decode()
def test_nbextensions(): def test_labextensions():
""" """
Validate nbextensions we want are installed & enabled Validate JupyterLab extensions we want are installed & enabled
""" """
# jupyter-nbextension writes to stdout and stderr weirdly # jupyter-labextension writes to stdout and stderr weirdly
proc = subprocess.run( proc = subprocess.run(
["/opt/tljh/user/bin/jupyter-nbextension", "list", "--sys-prefix"], ["/opt/tljh/user/bin/jupyter-labextension", "list"],
stderr=subprocess.PIPE, stderr=subprocess.PIPE,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
) )
extensions = [ extensions = [
"jupyter_resource_usage/main", "@jupyter-server/resource-usage",
# This is what ipywidgets nbextension is called # This is what ipywidgets lab extension is called
"jupyter-js-widgets/extension", "@jupyter-widgets/jupyterlab-manager",
] ]
for e in extensions: for e in extensions: