Skip to content

Commit 4d3bd45

Browse files
authored
Merge branch 'main' into fix-rx-short-lived-pipeline-leak
2 parents c8a5d32 + 1052848 commit 4d3bd45

3 files changed

Lines changed: 25 additions & 2 deletions

File tree

doc/conftest.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
def pytest_runtest_makereport(item, call):
2+
"""
3+
Skip tests that fail because "the kernel died before replying to kernel_info"
4+
this is a common error when running the example tests in CI.
5+
6+
Inspired from: https://stackoverflow.com/questions/32451811
7+
8+
"""
9+
from _pytest.runner import pytest_runtest_makereport
10+
11+
tr = pytest_runtest_makereport(item, call)
12+
13+
if call.excinfo is not None:
14+
msgs = [
15+
"Kernel died before replying to kernel_info",
16+
"Kernel didn't respond in 60 seconds",
17+
]
18+
for msg in msgs:
19+
if call.excinfo.type is RuntimeError and call.excinfo.value.args[0] in msg:
20+
tr.outcome = "skipped"
21+
tr.wasxfail = f"reason: {msg}"
22+
23+
return tr

param/parameterized.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6320,7 +6320,7 @@ def instance(self_or_cls, **params) -> Self:
63206320
params.pop('name')
63216321
cls = self_or_cls.__class__
63226322

6323-
inst = Parameterized.__new__(cls)
6323+
inst = Parameterized.__new__(cls) # pyrefly: ignore[bad-argument-type]
63246324
Parameterized.__init__(inst, **params)
63256325
if 'name' in params:
63266326
setattr(inst, "__name__", params['name'])

param/parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2647,7 +2647,7 @@ def __init__(
26472647
object.__setattr__(self, 'check_on_set', check_on_set)
26482648

26492649
instantiate = params.pop("instantiate", Undefined)
2650-
params["instantiate"] = False if instantiate is Undefined else instantiate # pyrefly: ignore[bad-typed-dict-key]
2650+
params["instantiate"] = False if instantiate is Undefined else instantiate # pyrefly: ignore[bad-assignment]
26512651
super().__init__(default=default, **params)
26522652
# Required as Parameter sets allow_None=True if default is None
26532653
if allow_None is Undefined:

0 commit comments

Comments
 (0)