From 2538a812e5c28f0b119fc3059117337ee6e9e399 Mon Sep 17 00:00:00 2001 From: Markus Holzer <markus.holzer@fau.de> Date: Fri, 10 Nov 2023 12:56:27 +0100 Subject: [PATCH] Try to remove conftest warnings --- conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conftest.py b/conftest.py index ceee053..ebd72bd 100644 --- a/conftest.py +++ b/conftest.py @@ -126,7 +126,7 @@ class IPyNbFile(pytest.File): exporter.exclude_markdown = True exporter.exclude_input_prompt = True - notebook_contents = self.path.open(encoding='utf-8') + notebook_contents = self.fspath.open(encoding='utf-8') with warnings.catch_warnings(): warnings.filterwarnings("ignore", "IPython.core.inputsplitter is deprecated") @@ -145,6 +145,6 @@ def pytest_collect_file(path, parent): glob_exprs = ["*demo*.ipynb", "*tutorial*.ipynb", "test_*.ipynb"] if any(path.fnmatch(g) for g in glob_exprs): if pytest_version >= 50403: - return IPyNbFile.from_parent(path=path, parent=parent) + return IPyNbFile.from_parent(fspath=path, parent=parent) else: return IPyNbFile(path, parent) -- GitLab