Skip to content

Commit a379efa

Browse files
:fixup: ignore xdist plugins
1 parent 93d89bd commit a379efa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/_pytest/config/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,9 @@ def parse_hookimpl_opts(self, plugin: _PluggyPlugin, name: str):
407407
name: hasattr(method, name) or name in known_marks
408408
for name in ("tryfirst", "trylast", "optionalhook", "hookwrapper")
409409
}
410-
if any(opts.values()):
410+
if any(opts.values()) and not getattr(plugin, "__name__", "").startswith(
411+
"xdist."
412+
):
411413
message = _pytest.deprecated.HOOK_LEGACY_MARKING.format(
412414
type="spec", fullname=method.__qualname__
413415
)

0 commit comments

Comments
 (0)