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

Fix pytest deprication and marker warnings

parent 7b060744
Branches
Tags
1 merge request!158Adapted test cases to Sympy Version 1.6
......@@ -151,7 +151,7 @@ class IPyNbFile(pytest.File):
warnings.filterwarnings("ignore", "IPython.core.inputsplitter is deprecated")
notebook = nbformat.read(notebook_contents, 4)
code, _ = exporter.from_notebook_node(notebook)
yield IPyNbTest(self.name, self, code)
yield IPyNbTest.from_parent(name=self.name, parent=self, code=code)
def teardown(self):
pass
......@@ -160,4 +160,4 @@ class IPyNbFile(pytest.File):
def pytest_collect_file(path, parent):
glob_exprs = ["*demo*.ipynb", "*tutorial*.ipynb", "test_*.ipynb"]
if any(path.fnmatch(g) for g in glob_exprs):
return IPyNbFile(path, parent)
return IPyNbFile.from_parent(fspath=path, parent=parent)
......@@ -4,6 +4,7 @@ norecursedirs = *.egg-info .git .cache .ipynb_checkpoints htmlcov
addopts = --doctest-modules --durations=20 --cov-config pytest.ini
markers =
kerncraft: tests depending on kerncraft
notebook: mark for notebooks
[run]
branch = True
......
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