MCPcopy Create free account
hub / github.com/pytest-dev/pytest / param

Method param

src/_pytest/mark/structures.py:86–101  ·  view source on GitHub ↗
(
        cls,
        *values: object,
        marks: Union["MarkDecorator", Collection[Union["MarkDecorator", "Mark"]]] = (),
        id: Optional[str] = None,
    )

Source from the content-addressed store, hash-verified

84):
85 @classmethod
86 def param(
87 cls,
88 *values: object,
89 marks: Union["MarkDecorator", Collection[Union["MarkDecorator", "Mark"]]] = (),
90 id: Optional[str] = None,
91 ) -> "ParameterSet":
92 if isinstance(marks, MarkDecorator):
93 marks = (marks,)
94 else:
95 assert isinstance(marks, collections.abc.Collection)
96
97 if id is not None:
98 if not isinstance(id, str):
99 raise TypeError(f"Expected id to be a string, got {type(id)}: {id!r}")
100 id = ascii_escaped(id)
101 return cls(values, marks, id)
102
103 @classmethod
104 def extract_from(

Calls 2

ascii_escapedFunction · 0.85
clsFunction · 0.85