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

Function test_matches

testing/python/raises_group.py:470–478  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

468
469
470def test_matches() -> None:
471 rg = RaisesGroup(ValueError)
472 assert not rg.matches(None)
473 assert not rg.matches(ValueError())
474 assert rg.matches(ExceptionGroup("", (ValueError(),)))
475
476 re = RaisesExc(ValueError)
477 assert not re.matches(None)
478 assert re.matches(ValueError())
479
480
481def test_message() -> None:

Callers

nothing calls this directly

Calls 4

matchesMethod · 0.95
matchesMethod · 0.95
RaisesGroupClass · 0.90
RaisesExcClass · 0.90

Tested by

no test coverage detected