Skip to content

Commit 07f05b2

Browse files
authored
Fix imports (#23)
1 parent 6795b9e commit 07f05b2

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ The `pytest_jupyter.jupyter_client` plugin provides an installed
4040
that provides a factory function that starts a kernel using the `echo` kernel
4141
by default.
4242

43+
Note: The server plugin also includes the client plugin, so you can use both
44+
sets of fixtures with `"pytest_jupyter.jupyter_server"`. Both the `client`
45+
and `server` plugins also include the core fixtures.
46+
4347
The server fixures use the echo kernel by default. To override this behavior,
4448
override the `jp_server_config` fixture and add the following config:
4549

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ client = [
4343
server = [
4444
"jupyter_server>=1.21",
4545
"nbformat>=5.3",
46+
"pytest-jupyter[client]",
4647
"pytest-tornasync>=0.6"
4748
]
4849
test = [

pytest_jupyter/jupyter_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
"you need. Try: `pip install 'pytest-jupyter[client]'`"
2323
)
2424

25+
from pytest_jupyter import * # noqa
26+
2527
try:
2628
import resource
2729
except ImportError:

pytest_jupyter/jupyter_server.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,10 @@
4545
)
4646

4747

48-
from .jupyter_client import echo_kernel_spec # noqa
49-
from .utils import mkdir
48+
from pytest_jupyter.utils import mkdir
5049

5150
# List of dependencies needed for this plugin.
52-
pytest_plugins = ["pytest_tornasync", "pytest_jupyter"]
51+
pytest_plugins = ["pytest_tornasync", "pytest_jupyter.jupyter_client"]
5352

5453

5554
@pytest.fixture

0 commit comments

Comments
 (0)