File tree Expand file tree Collapse file tree 2 files changed +1
-9
lines changed Expand file tree Collapse file tree 2 files changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -1242,10 +1242,6 @@ def __init__(
12421242 else :
12431243 self ._fixture_function = function
12441244 functools .update_wrapper (self , function )
1245- # Wrapping the original function will create a __wrapped__ in this object.
1246- # Remove the __wrapped__ so the inspect.unwrap will not access the original function.
1247- # Unwrapping must be done with the _get_wrapped_function method.
1248- delattr (self , "__wrapped__" )
12491245
12501246 def __repr__ (self ) -> str :
12511247 return f"<pytest_fixture({ self ._fixture_function } )>"
Original file line number Diff line number Diff line change @@ -67,11 +67,7 @@ def wrapped_func3():
6767 pass # pragma: no cover
6868
6969 wrapped_func4 = decorator (wrapped_func3 )
70- assert (
71- # get_real_func does not unwrap function that is wrapped by fixture hence we need to call _get_wrapped_function
72- get_real_func (wrapped_func4 )._get_wrapped_function ()
73- is wrapped_func3 ._get_wrapped_function ()
74- )
70+ assert get_real_func (wrapped_func4 ) is wrapped_func3 ._get_wrapped_function ()
7571
7672
7773def test_get_real_func_partial () -> None :
You can’t perform that action at this time.
0 commit comments