From 20c2c30ff241cf3bb48290edd1b7bfebceccd007 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sat, 5 Feb 2022 11:52:36 +0200 Subject: [PATCH] mark/structures: use class-based NamedTuple syntax Should hopefully work now in Python>=3.7. --- src/_pytest/mark/structures.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/_pytest/mark/structures.py b/src/_pytest/mark/structures.py index 0e42cd8de..ec41b3f99 100644 --- a/src/_pytest/mark/structures.py +++ b/src/_pytest/mark/structures.py @@ -72,16 +72,11 @@ def get_empty_parameterset_mark( return mark -class ParameterSet( - NamedTuple( - "ParameterSet", - [ - ("values", Sequence[Union[object, NotSetType]]), - ("marks", Collection[Union["MarkDecorator", "Mark"]]), - ("id", Optional[str]), - ], - ) -): +class ParameterSet(NamedTuple): + values: Sequence[Union[object, NotSetType]] + marks: Collection[Union["MarkDecorator", "Mark"]] + id: Optional[str] + @classmethod def param( cls,