File tree 1 file changed +9
-1
lines changed 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -252,6 +252,9 @@ class TestException(Exception):
252
252
def raising_function ():
253
253
raise RuntimeError
254
254
255
+ def raising_function_VE ():
256
+ raise ValueError
257
+
255
258
def transformer (excp ):
256
259
if isinstance (excp , RuntimeError ):
257
260
raise TestException
@@ -265,9 +268,14 @@ def transformer(excp):
265
268
cb_filt = cbook .CallbackRegistry (exception_handler = transformer )
266
269
cb_filt .connect ('foo' , raising_function )
267
270
271
+ # filter
272
+ cb_filt_pass = cbook .CallbackRegistry (exception_handler = transformer )
273
+ cb_filt_pass .connect ('foo' , raising_function_VE )
274
+
268
275
return pytest .mark .parametrize ('cb, excp' ,
269
276
[[cb_old , RuntimeError ],
270
- [cb_filt , TestException ]])(func )
277
+ [cb_filt , TestException ],
278
+ [cb_filt_pass , ValueError ]])(func )
271
279
272
280
273
281
@raising_cb_reg
You can’t perform that action at this time.
0 commit comments