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

Method test_match_failure_string_quoting

testing/python/raises.py:215–220  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

213 pytest.raises(ValueError, tfunc, match="").match("match=")
214
215 def test_match_failure_string_quoting(self):
216 with pytest.raises(AssertionError) as excinfo:
217 with pytest.raises(AssertionError, match="'foo"):
218 raise AssertionError("'bar")
219 (msg,) = excinfo.value.args
220 assert msg == 'Regex pattern "\'foo" does not match "\'bar".'
221
222 def test_match_failure_exact_string_message(self):
223 message = "Oh here is a message with (42) numbers in parameters"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected