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

Function test_entrysource_Queue_example

testing/code/test_excinfo.py:414–423  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

412
413
414def test_entrysource_Queue_example():
415 try:
416 queue.Queue().get(timeout=0.001)
417 except queue.Empty:
418 excinfo = _pytest._code.ExceptionInfo.from_current()
419 entry = excinfo.traceback[-1]
420 source = entry.getsource()
421 assert source is not None
422 s = str(source).strip()
423 assert s.startswith("def get")
424
425
426def test_codepath_Queue_example() -> None:

Callers

nothing calls this directly

Calls 4

from_currentMethod · 0.80
getsourceMethod · 0.80
stripMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected