We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a3f409 commit 65c2301Copy full SHA for 65c2301
testing/python/integration.py
@@ -104,21 +104,15 @@ def f(x):
104
values = getfuncargnames(f)
105
assert values == ("x",)
106
107
- @pytest.mark.xfail(
108
- strict=False, reason="getfuncargnames breaks if mock is imported"
109
- )
110
- def test_wrapped_getfuncargnames_patching(self):
+ def test_getfuncargnames_patching(self):
111
from _pytest.compat import getfuncargnames
+ from unittest.mock import patch
112
113
- def wrap(f):
114
- def func():
+ class T:
+ def original(self, x, y, z):
115
pass
116
117
- func.__wrapped__ = f
118
- func.patchings = ["qwe"]
119
- return func
120
-
121
- @wrap
+ @patch.object(T, "original")
122
def f(x, y, z):
123
124
0 commit comments