fix #4
This commit is contained in:
parent
40b8855cc4
commit
6b9f5ded0f
|
@ -368,11 +368,9 @@ def get_unpacked_marks(obj: object) -> Iterable[Mark]:
|
|||
return normalize_mark_list(mark_list)
|
||||
|
||||
|
||||
def get_mro_marks(cls: type) -> List[Mark]:
|
||||
if cls is object or cls is None:
|
||||
return []
|
||||
if hasattr(cls, "mro_markers"):
|
||||
return getattr(cls, "mro_markers")
|
||||
def get_mro_marks(cls: type):
|
||||
if cls is object or cls is None or hasattr(cls, "mro_markers"):
|
||||
return getattr(cls, "mro_markers", [])
|
||||
|
||||
# markers = list(mark for mark in get_unpacked_marks(cls) if mark.name != "parametrize")
|
||||
markers = list(mark for mark in get_unpacked_marks(cls))
|
||||
|
|
|
@ -1129,8 +1129,8 @@ def test_marker_expr_eval_failure_handling(pytester: Pytester, expr) -> None:
|
|||
assert result.ret == ExitCode.USAGE_ERROR
|
||||
|
||||
|
||||
def test_markers_from_multiple_inheritances(pytester: Pytester, request) -> None:
|
||||
py_file = pytester.makepyfile(
|
||||
def test_markers_from_multiple_inheritances(pytester: Pytester) -> None:
|
||||
pytester.makepyfile(
|
||||
"""
|
||||
import pytest
|
||||
@pytest.mark.mark1
|
||||
|
|
Loading…
Reference in New Issue