From 6534b9d5f398ccad44e20cd19cb3107000ecebf0 Mon Sep 17 00:00:00 2001 From: markus holzer <markus.holzer@fau.de> Date: Wed, 5 Aug 2020 11:11:26 +0200 Subject: [PATCH] Update conftest and readme --- README.md | 2 +- conftest.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 80bf1176..97b6f064 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/conftest.py b/conftest.py index cb17c79b..93952522 100644 --- a/conftest.py +++ b/conftest.py @@ -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) -- GitLab