diff --git a/tests/test_tutorials.py b/tests/test_tutorials.py index c4d481b12..4ba936a55 100644 --- a/tests/test_tutorials.py +++ b/tests/test_tutorials.py @@ -1,10 +1,16 @@ import contextlib +import os from pathlib import Path import nbformat import pytest -from nbclient import NotebookClient -from nbclient.exceptions import CellExecutionError + +# Ensure Jupyter uses the new platformdirs paths to avoid DeprecationWarning +# This will become the default in `jupyter_core` v6 +os.environ.setdefault("JUPYTER_PLATFORM_DIRS", "1") + +from nbclient import NotebookClient # noqa: E402 +from nbclient.exceptions import CellExecutionError # noqa: E402 def _find_tutorial_notebooks():