-
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore error failing notebooks for now
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import holoviews as hv | ||
|
||
from packaging.version import Version | ||
|
||
|
||
collect_ignore_glob = [] | ||
|
||
|
||
# 2023-10: https://github.com/holoviz/hvplot/pull/1164 | ||
if Version(hv.__version__) == Version("1.18.0a4"): | ||
collect_ignore_glob += [ | ||
"examples/reference/xarray/contourf.ipynb", | ||
"examples/user_guide/Geographic_Data.ipynb", | ||
] | ||
|
||
|
||
def pytest_runtest_makereport(item, call): | ||
""" | ||
Skip tests that fail because "the kernel died before replying to kernel_info" | ||
or "Kernel didn't respond in 60 seconds", | ||
these are common errors 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 |