File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -1148,7 +1148,11 @@ def test():
1148
1148
class Wrapped:
1149
1149
class MyPdb:
1150
1150
def set_trace(self, *args):
1151
- print("mypdb_called", args)
1151
+ print("settrace_called", args)
1152
+
1153
+ def runcall(self, *args, **kwds):
1154
+ print("runcall_called", args, kwds)
1155
+ assert "func" in kwds
1152
1156
""" ,
1153
1157
)
1154
1158
result = testdir .runpytest (
@@ -1165,4 +1169,11 @@ def set_trace(self, *args):
1165
1169
str (p1 ), "--pdbcls=mypdb:Wrapped.MyPdb" , syspathinsert = True
1166
1170
)
1167
1171
assert result .ret == 0
1168
- result .stdout .fnmatch_lines (["*mypdb_called*" , "* 1 passed in *" ])
1172
+ result .stdout .fnmatch_lines (["*settrace_called*" , "* 1 passed in *" ])
1173
+
1174
+ # Ensure that it also works with --trace.
1175
+ result = testdir .runpytest (
1176
+ str (p1 ), "--pdbcls=mypdb:Wrapped.MyPdb" , "--trace" , syspathinsert = True
1177
+ )
1178
+ assert result .ret == 0
1179
+ result .stdout .fnmatch_lines (["*runcall_called*" , "* 1 passed in *" ])
You can’t perform that action at this time.
0 commit comments