Skip to content
Snippets Groups Projects
Commit 2538a812 authored by Markus Holzer's avatar Markus Holzer
Browse files

Try to remove conftest warnings

parent 010f0bb9
No related merge requests found
Pipeline #57023 passed with stages
in 39 minutes and 44 seconds
......@@ -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)
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment