File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -91,13 +91,12 @@ def test_scan_with_exception(self, load_mock):
91
91
exitcode = scan ()
92
92
self .assertEqual (1 , exitcode )
93
93
94
- @patch ("pysonar_scanner.__main__.scan" , return_value = 42 )
95
- def test_main_with_exitcode_not_zero (self , m ):
96
- exitcode = scan ()
97
- self .assertEqual (exitcode , 42 )
98
- with self .assertRaises (SystemExit ) as main_exit :
99
- main ()
100
- self .assertEqual (main_exit .exception , 42 )
94
+
95
+ def test_main_with_exitcode_not_zero (self ):
96
+ with patch ("pysonar_scanner.__main__.scan" , return_value = 42 ):
97
+ with self .assertRaises (SystemExit ) as main_exit :
98
+ main ()
99
+ self .assertEqual (main_exit .exception .code , 42 )
101
100
102
101
def test_version_check_outdated_sonarqube (self ):
103
102
sq_cloud_api = sq_api_utils .get_sq_server ()
You can’t perform that action at this time.
0 commit comments