/
conftest.py
34 lines (27 loc) · 931 Bytes
/
conftest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
collect_ignore_glob = [
"apps/",
"developer_guide/",
"homepage.ipynb",
"*VTK*.ipynb",
"*Vega.ipynb",
"*DeckGL*.ipynb",
"*Terminal.ipynb",
]
def pytest_runtest_makereport(item, call):
"""
Skip tests that fail because "the kernel died before replying to kernel_info"
this is a common error when running the example tests in CI.
Inspired from: https://stackoverflow.com/questions/32451811
"""
from _pytest.runner import pytest_runtest_makereport
tr = pytest_runtest_makereport(item, call)
if call.excinfo is not None:
msgs = [
"Kernel died before replying to kernel_info",
"Kernel didn't respond in 60 seconds",
]
for msg in msgs:
if call.excinfo.type == RuntimeError and call.excinfo.value.args[0] in msg:
tr.outcome = "skipped"
tr.wasxfail = f"reason: {msg}"
return tr