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

Function test_wrapped_getfslineno

testing/python/integration.py:82–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80
81
82def test_wrapped_getfslineno() -> None:
83 def func():
84 pass
85
86 def wrap(f):
87 func.__wrapped__ = f # type: ignore
88 func.patchings = ["qwe"] # type: ignore
89 return func
90
91 @wrap
92 def wrapped_func(x, y, z):
93 pass
94
95 fs, lineno = getfslineno(wrapped_func)
96 fs2, lineno2 = getfslineno(wrap)
97 assert lineno > lineno2, "getfslineno does not unwrap correctly"
98
99
100class TestMockDecoration:

Callers

nothing calls this directly

Calls 1

getfslinenoFunction · 0.90

Tested by

no test coverage detected