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

Function test_wrapped_getfslineno

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

Source from the content-addressed store, hash-verified

9
10
11def test_wrapped_getfslineno() -> None:
12 def func():
13 pass
14
15 def wrap(f):
16 func.__wrapped__ = f # type: ignore
17 func.patchings = ["qwe"] # type: ignore
18 return func
19
20 @wrap
21 def wrapped_func(x, y, z):
22 pass
23
24 _fs, lineno = getfslineno(wrapped_func)
25 _fs2, lineno2 = getfslineno(wrap)
26 assert lineno > lineno2, "getfslineno does not unwrap correctly"
27
28
29class TestMockDecoration:

Callers

nothing calls this directly

Calls 1

getfslinenoFunction · 0.90

Tested by

no test coverage detected