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

Update conftest and readme

parent 2d758462
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ import numpy as np
f, g = ps.fields("f, g : [2D]")
stencil = ps.Assignment(g[0, 0],
(f[1, 0] + f[-1, 0] + f[0, 1] + f[0, -1]) / 4)
(f[1, 0] + f[-1, 0] + f[0, 1] + f[0, -1]) / 4)
kernel = ps.create_kernel(stencil).compile()
f_arr = np.random.rand(1000, 1000)
......
......@@ -152,8 +152,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)
# pytest v 2.4>: yield IPyNbTest.from_parent(name=self.name, parent=self, code=code)
yield IPyNbTest.from_parent(name=self.name, parent=self, code=code)
def teardown(self):
pass
......@@ -162,5 +161,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)
# pytest v 2.4 >: return IPyNbFile.from_parent(fspath=path, parent=parent)
return IPyNbFile.from_parent(fspath=path, parent=parent)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment