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

Class WarningCollector

testing/test_warnings.py:269–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267 collected = []
268
269 class WarningCollector:
270 def pytest_warning_recorded(self, warning_message, when, nodeid, location):
271 collected.append((str(warning_message.message), when, nodeid, location))
272
273 result = pytester.runpytest(plugins=[WarningCollector()])
274 result.stdout.fnmatch_lines(["*1 passed*"])

Callers 1

Calls

no outgoing calls

Tested by 1