Skip to content

Commit bbfd619

Browse files
committed
Fix minimum-version strict-warning tests
1 parent bbc9614 commit bbfd619

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎tests/test_kernel.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,8 @@ def test_shutdown():
663663

664664
@pytest.mark.parametrize("restart", [False, True])
665665
def test_lifecycle_with_warnings_as_errors(monkeypatch, restart):
666+
# Avoid jupyter_core's unrelated path-migration warning in the child.
667+
monkeypatch.setenv("JUPYTER_PLATFORM_DIRS", "1")
666668
monkeypatch.setenv("PYTHONWARNINGS", "error")
667669
with new_kernel() as kc:
668670
_msg_id, content = execute("answer = 6 * 7", kc=kc)

‎tests/test_kernelapp.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ def trigger_stop():
5858

5959

6060
@pytest.mark.parametrize("loop_state", ["unset", "cleared", "existing"])
61-
def test_start_app_event_loop(loop_state):
61+
def test_start_app_event_loop(loop_state, monkeypatch):
62+
# Avoid jupyter_core's unrelated path-migration warning in the child.
63+
monkeypatch.setenv("JUPYTER_PLATFORM_DIRS", "1")
6264
code = dedent(
6365
"""
6466
import asyncio

0 commit comments

Comments
 (0)