@@ -63,10 +63,9 @@ def test_create_no_options(self):
6363 arglist = []
6464 verifylist = []
6565
66- try :
67- self .check_parser (self .cmd , arglist , verifylist )
68- except tests_utils .ParserException :
69- pass
66+ # Missing required args should bail here
67+ self .assertRaises (tests_utils .ParserException , self .check_parser ,
68+ self .cmd , arglist , verifylist )
7069
7170 def test_create_default_options (self ):
7271 arglist = [
@@ -303,11 +302,9 @@ def test_set_distributed_centralized(self):
303302 ('distributed' , False ),
304303 ]
305304
306- try :
307- # Argument parse failing should bail here
308- self .check_parser (self .cmd , arglist , verifylist )
309- except tests_utils .ParserException :
310- pass
305+ # Missing required args should bail here
306+ self .assertRaises (tests_utils .ParserException , self .check_parser ,
307+ self .cmd , arglist , verifylist )
311308
312309 def test_set_nothing (self ):
313310 arglist = [self ._router .name , ]
@@ -353,11 +350,9 @@ def test_show_no_options(self):
353350 arglist = []
354351 verifylist = []
355352
356- try :
357- # Missing required args should bail here
358- self .check_parser (self .cmd , arglist , verifylist )
359- except tests_utils .ParserException :
360- pass
353+ # Missing required args should bail here
354+ self .assertRaises (tests_utils .ParserException , self .check_parser ,
355+ self .cmd , arglist , verifylist )
361356
362357 def test_show_all_options (self ):
363358 arglist = [
0 commit comments