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 branches found
No related tags found
1 merge request!157[Fix] Warning filter in fluctuating LB test
...@@ -126,7 +126,7 @@ class IPyNbFile(pytest.File): ...@@ -126,7 +126,7 @@ class IPyNbFile(pytest.File):
exporter.exclude_markdown = True exporter.exclude_markdown = True
exporter.exclude_input_prompt = 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(): with warnings.catch_warnings():
warnings.filterwarnings("ignore", "IPython.core.inputsplitter is deprecated") warnings.filterwarnings("ignore", "IPython.core.inputsplitter is deprecated")
...@@ -145,6 +145,6 @@ def pytest_collect_file(path, parent): ...@@ -145,6 +145,6 @@ def pytest_collect_file(path, parent):
glob_exprs = ["*demo*.ipynb", "*tutorial*.ipynb", "test_*.ipynb"] glob_exprs = ["*demo*.ipynb", "*tutorial*.ipynb", "test_*.ipynb"]
if any(path.fnmatch(g) for g in glob_exprs): if any(path.fnmatch(g) for g in glob_exprs):
if pytest_version >= 50403: if pytest_version >= 50403:
return IPyNbFile.from_parent(path=path, parent=parent) return IPyNbFile.from_parent(fspath=path, parent=parent)
else: else:
return IPyNbFile(path, parent) return IPyNbFile(path, parent)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment