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

Method test_record

testing/test_recwarn.py:304–309  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

302 )
303
304 def test_record(self) -> None:
305 with pytest.warns(UserWarning) as record:
306 warnings.warn("user", UserWarning)
307
308 assert len(record) == 1
309 assert str(record[0].message) == "user"
310
311 def test_record_only(self) -> None:
312 with pytest.warns() as record:

Callers

nothing calls this directly

Calls 1

warnMethod · 0.45

Tested by

no test coverage detected