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

Method test_collect_single_item

testing/test_terminal.py:304–313  ·  view source on GitHub ↗

Use singular 'item' when reporting a single test item

(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

302 result.stdout.fnmatch_lines(["*KeyboardInterrupt*"])
303
304 def test_collect_single_item(self, pytester: Pytester) -> None:
305 """Use singular 'item' when reporting a single test item"""
306 pytester.makepyfile(
307 """
308 def test_foobar():
309 pass
310 """
311 )
312 result = pytester.runpytest()
313 result.stdout.fnmatch_lines(["collected 1 item"])
314
315 def test_rewrite(self, pytester: Pytester, monkeypatch) -> None:
316 config = pytester.parseconfig()

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected