Skip to content

marker extraction currently does not handle inheritance adequately #8401

@RonnyPfannschmidt

Description

@RonnyPfannschmidt

marker extraction currently does not handle inheritance adequately

Originally posted by @RonnyPfannschmidt in #8400 (comment)

def get_unpacked_marks(obj) -> List[Mark]:
"""Obtain the unpacked marks that are stored on an object."""
mark_list = getattr(obj, "pytestmark", [])
if not isinstance(mark_list, list):
mark_list = [mark_list]
return normalize_mark_list(mark_list)
does not handle the mro at all

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: marksrelated to marks, either the general marks or builtin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions