MCPcopy
hub / github.com/pytest-dev/pytest / reject

Method reject

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

Source from the content-addressed store, hash-verified

148 return None
149
150 def reject(self, expected: Sequence[TokenType]) -> NoReturn:
151 raise SyntaxError(
152 "expected {}; got {}".format(
153 " OR ".join(type.value for type in expected),
154 self.current.type.value,
155 ),
156 (FILE_NAME, 1, self.current.pos + 1, self.input),
157 )
158
159
160# True, False and None are legal match expression identifiers,

Callers 2

acceptMethod · 0.95
not_exprFunction · 0.80

Calls 2

joinMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected