File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -252,6 +252,9 @@ class TestException(Exception):
252252 def raising_function ():
253253 raise RuntimeError
254254
255+ def raising_function_VE ():
256+ raise ValueError
257+
255258 def transformer (excp ):
256259 if isinstance (excp , RuntimeError ):
257260 raise TestException
@@ -265,9 +268,14 @@ def transformer(excp):
265268 cb_filt = cbook .CallbackRegistry (exception_handler = transformer )
266269 cb_filt .connect ('foo' , raising_function )
267270
271+ # filter
272+ cb_filt_pass = cbook .CallbackRegistry (exception_handler = transformer )
273+ cb_filt_pass .connect ('foo' , raising_function_VE )
274+
268275 return pytest .mark .parametrize ('cb, excp' ,
269276 [[cb_old , RuntimeError ],
270- [cb_filt , TestException ]])(func )
277+ [cb_filt , TestException ],
278+ [cb_filt_pass , ValueError ]])(func )
271279
272280
273281@raising_cb_reg
You can’t perform that action at this time.
0 commit comments