Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephan Seitz
pystencils
Commits
f888c012
Commit
f888c012
authored
Jun 17, 2020
by
Markus Holzer
Browse files
Fix pytest deprication and marker warnings
parent
7b060744
Changes
2
Hide whitespace changes
Inline
Side-by-side
conftest.py
View file @
f888c012
...
...
@@ -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
)
pytest.ini
View file @
f888c012
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment