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

Function test_entrysource_Queue_example

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

Source from the content-addressed store, hash-verified

381
382
383def test_entrysource_Queue_example():
384 try:
385 queue.Queue().get(timeout=0.001)
386 except queue.Empty:
387 excinfo = _pytest._code.ExceptionInfo.from_current()
388 entry = excinfo.traceback[-1]
389 source = entry.getsource()
390 assert source is not None
391 s = str(source).strip()
392 assert s.startswith("def get")
393
394
395def 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