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