@@ -66,10 +66,10 @@ def setup_method(self, _):
6666 self .test_dir = os .path .join (os .path .dirname (__file__ ), 'test_files' )
6767
6868 def __analyze (self ,
69- target ,
70- build_json ,
71- analyzer_extra_options = None ,
72- cwd = None ):
69+ target ,
70+ build_json ,
71+ analyzer_extra_options = None ,
72+ cwd = None ):
7373 """ Analyze the target project. """
7474 if not cwd :
7575 cwd = os .path .join (self .test_dir , target )
@@ -174,9 +174,8 @@ def test_skip(self):
174174 def test_skip_directory (self ):
175175 """Test wether directories in skipfile entries works correctly"""
176176 with tempfile .NamedTemporaryFile (
177- mode = 'w' ,
178- suffix = "skipfile" ,
179- encoding = 'utf-8' ) as skip_file :
177+ mode = "w" , suffix = "skipfile" , encoding = "utf-8"
178+ ) as skip_file :
180179
181180 # Skip the `skipme` folder, the way its in the documentation
182181 skip_file .write ('\n ' .join ([
@@ -192,9 +191,8 @@ def test_skip_directory(self):
192191 self .assertFalse ("skipme.cpp" in f )
193192
194193 with tempfile .NamedTemporaryFile (
195- mode = 'w' ,
196- suffix = "skipfile" ,
197- encoding = 'utf-8' ) as skip_file :
194+ mode = "w" , suffix = "skipfile" , encoding = "utf-8"
195+ ) as skip_file :
198196
199197 # Skip the `skipme` folder, leaving out the '*'
200198 skip_file .write ('\n ' .join ([
@@ -210,11 +208,10 @@ def test_skip_directory(self):
210208 self .assertFalse ("skipme.cpp" in f )
211209
212210 with tempfile .NamedTemporaryFile (
213- mode = 'w' ,
214- suffix = "skipfile" ,
215- encoding = 'utf-8' ) as skip_file :
211+ mode = "w" , suffix = "skipfile" , encoding = "utf-8"
212+ ) as skip_file :
216213
217- # Skip the ` skipme` folder, without any indication that its a folder
214+ # Skip the skipme folder, without any indication that its a folder
218215 skip_file .write ('\n ' .join ([
219216 '-*skipme' ,
220217 ]))
@@ -233,7 +230,7 @@ def test_drop_reports(self):
233230 # we should not see a report from file_to_be_skipped.cpp
234231
235232 self .__log_and_analyze ("simple" , ["--ignore" , "skipfile" ,
236- "--drop-reports-from-skipped-files" ])
233+ "--drop-reports-from-skipped-files" ])
237234
238235 # Check if file is skipped.
239236 report_dir_files = os .listdir (self .report_dir )
@@ -354,7 +351,7 @@ def test_analyze_skip_everything(self):
354351 skip_file .flush ()
355352
356353 self .__log_and_analyze ("simple" ,
357- ["--ignore" , skip_file .name ])
354+ ["--ignore" , skip_file .name ])
358355 self .assertFalse (
359356 glob .glob (os .path .join (self .report_dir , '*.plist' )))
360357
@@ -440,15 +437,18 @@ def check_parse_out(out):
440437
441438 # Do the CodeChecker Analyze with --file
442439 # We also need to set cwd to test_workspace
443- out , _ = self .__analyze ("simple" ,
444- build_json ,
445- ["--clean" ,
446- "--file" ,
447- Path (
448- self .test_workspace ,
449- "rel_simple" ,
450- "skip_header.cpp" ).absolute ()],
451- cwd = self .test_workspace )
440+ out , _ = self .__analyze (
441+ "simple" ,
442+ build_json ,
443+ [
444+ "--clean" ,
445+ "--file" ,
446+ Path (
447+ self .test_workspace , "rel_simple" , "skip_header.cpp"
448+ ).absolute (),
449+ ],
450+ cwd = self .test_workspace ,
451+ )
452452 check_analyze_out (out )
453453
454454 out = self .__run_parse ()
0 commit comments