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

Method raise_warnings_from_list

testing/test_recwarn.py:55–57  ·  view source on GitHub ↗
(_warnings: list[type[Warning]])

Source from the content-addressed store, hash-verified

53
54 @staticmethod
55 def raise_warnings_from_list(_warnings: list[type[Warning]]):
56 for warn in _warnings:
57 warnings.warn(f"Warning {warn().__repr__()}", warn)
58
59 def test_pop_finds_exact_match(self):
60 with pytest.warns((self.ParentWarning, self.ChildWarning)) as record:

Calls 2

warnMethod · 0.45
__repr__Method · 0.45

Tested by

no test coverage detected