From f888c012373efdfc45aa8b0da7cf41b84183f1ff Mon Sep 17 00:00:00 2001
From: markus <markus.holzer@fau.de>
Date: Wed, 17 Jun 2020 17:14:48 +0200
Subject: [PATCH] Fix pytest deprication and marker warnings

---
 conftest.py | 4 ++--
 pytest.ini  | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/conftest.py b/conftest.py
index d6b74818a..980df61cc 100644
--- a/conftest.py
+++ b/conftest.py
@@ -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)
diff --git a/pytest.ini b/pytest.ini
index 007042596..ad6eb67d5 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -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
-- 
GitLab