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

Method reject

src/_pytest/mark/expression.py:120–127  ·  view source on GitHub ↗
(self, expected: Sequence[TokenType])

Source from the content-addressed store, hash-verified

118 return None
119
120 def reject(self, expected: Sequence[TokenType]) -> "NoReturn":
121 raise ParseError(
122 self.current.pos + 1,
123 "expected {}; got {}".format(
124 " OR ".join(type.value for type in expected),
125 self.current.type.value,
126 ),
127 )
128
129
130# True, False and None are legal match expression identifiers,

Callers 2

acceptMethod · 0.95
not_exprFunction · 0.80

Calls 2

ParseErrorClass · 0.85
formatMethod · 0.45

Tested by

no test coverage detected