Skip to content

Commit ee8db6a

Browse files
authored
Use pytest-jupyter (#351)
1 parent efa7ed7 commit ee8db6a

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

jupyterlab_server/pytest_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from jupyterlab_server import LabServerApp
1010

11-
pytest_plugins = ["jupyter_server.pytest_plugin"]
11+
pytest_plugins = ["pytest_jupyter.jupyter_server"]
1212

1313

1414
def mkdir(tmp_path, *parts):

jupyterlab_server/workspaces_app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ def start(self):
6161
workspaces = self.manager.list_workspaces()
6262
if self.jsonlines:
6363
for workspace in workspaces:
64-
self.log.info(json.dumps(workspace))
64+
print(json.dumps(workspace)) # noqa
6565
elif self.json:
66-
self.log.info(json.dumps(workspaces))
66+
print(json.dumps(workspaces)) # noqa
6767
else:
6868
for workspace in workspaces:
69-
self.log.info(workspace["metadata"]["id"])
69+
print(workspace["metadata"]["id"]) # noqa
7070

7171

7272
class WorkspaceExportApp(JupyterApp, LabConfig):
@@ -92,7 +92,7 @@ def start(self):
9292
raw = DEFAULT_WORKSPACE if not self.extra_args else self.extra_args[0]
9393
try:
9494
workspace = self.manager.load(raw)
95-
self.log.info(json.dumps(workspace))
95+
print(json.dumps(workspace)) # noqa
9696
except Exception: # pragma: no cover
9797
self.log.error(json.dumps(dict(data=dict(), metadata=dict(id=raw))))
9898

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ classifiers = [
2121
"Programming Language :: Python :: 3.8",
2222
"Programming Language :: Python :: 3.9",
2323
"Programming Language :: Python :: 3.10",
24+
"Programming Language :: Python :: 3.11",
2425
"Typing :: Typed"]
2526
requires-python = ">=3.7"
2627
dependencies = [
@@ -29,7 +30,7 @@ dependencies = [
2930
"jinja2>=3.0.3",
3031
"json5>=0.9.0",
3132
"jsonschema>=3.0.1",
32-
"jupyter_server>=1.8,<3",
33+
"jupyter_server>=1.21,<3",
3334
"packaging>=21.3",
3435
"requests>=2.28",
3536
]
@@ -68,14 +69,15 @@ openapi = [
6869
test = [
6970
"codecov",
7071
"ipykernel",
71-
"jupyter_server[test]",
72+
"pytest-jupyter[server]>=0.6",
7273
# openapi_core 0.15.0 alpha is not working
7374
"openapi_core~=0.14.2",
7475
"openapi-spec-validator<0.6",
7576
"requests_mock",
7677
"pytest>=7.0",
7778
"pytest-console-scripts",
7879
"pytest-cov",
80+
"pytest-timeout",
7981
"ruamel.yaml",
8082
"strict-rfc3339"
8183
]

0 commit comments

Comments
 (0)