@@ -1216,7 +1216,7 @@ def test_file_duplicate_2(tmpdir):
12161216 assert stderr == ''
12171217
12181218
1219- def test_file_duplicate_3 (tmpdir ):
1219+ def test_file_duplicate_3 (tmpdir ): # #12834
12201220 test_file_a = os .path .join (tmpdir , 'a.c' )
12211221 with open (test_file_a , 'wt' ):
12221222 pass
@@ -1230,43 +1230,18 @@ def test_file_duplicate_3(tmpdir):
12301230 in_file_f = os .path .join (tmpdir , 'dummy' , '..' , 'a.c' )
12311231
12321232 args = [in_file_a , in_file_b , in_file_c , in_file_d , in_file_e , in_file_f , str (tmpdir )]
1233- args .append ('-j1' ) # TODO: remove when fixed
12341233
12351234 exitcode , stdout , stderr = cppcheck (args , cwd = tmpdir )
12361235 assert exitcode == 0 , stdout if stdout else stderr
12371236 lines = stdout .splitlines ()
1238- # TODO: only a single file should be checked
1239- if sys .platform == 'win32' :
1240- assert lines == [
1241- 'Checking {} ...' .format ('a.c' ),
1242- '1/6 files checked 16% done' ,
1243- 'Checking {} ...' .format ('a.c' ),
1244- '2/6 files checked 33% done' ,
1245- 'Checking {} ...' .format ('a.c' ),
1246- '3/6 files checked 50% done' ,
1247- 'Checking {} ...' .format (test_file_a ),
1248- '4/6 files checked 66% done' ,
1249- 'Checking {} ...' .format (test_file_a ),
1250- '5/6 files checked 83% done' ,
1251- 'Checking {} ...' .format (test_file_a ),
1252- '6/6 files checked 100% done'
1253- ]
1254- else :
1255- assert lines == [
1256- 'Checking {} ...' .format ('a.c' ),
1257- '1/4 files checked 25% done' ,
1258- 'Checking {} ...' .format ('a.c' ),
1259- '2/4 files checked 50% done' ,
1260- 'Checking {} ...' .format (test_file_a ),
1261- '3/4 files checked 75% done' ,
1262- 'Checking {} ...' .format (test_file_a ),
1263- '4/4 files checked 100% done'
1264- ]
1237+ assert lines == [
1238+ 'Checking {} ...' .format ('a.c' )
1239+ ]
12651240 assert stderr == ''
12661241
12671242
12681243@pytest .mark .skipif (sys .platform != 'win32' , reason = "requires Windows" )
1269- def test_file_duplicate_4 (tmpdir ):
1244+ def test_file_duplicate_4 (tmpdir ): # #12834
12701245 test_file_a = os .path .join (tmpdir , 'a.c' )
12711246 with open (test_file_a , 'wt' ):
12721247 pass
@@ -1284,25 +1259,12 @@ def test_file_duplicate_4(tmpdir):
12841259 for a in args1 :
12851260 args2 .append (a .replace ('\\ ' , '/' ))
12861261 args = args1 + args2
1287- args .append ('-j1' ) # TODO: remove when fixed
12881262
12891263 exitcode , stdout , stderr = cppcheck (args , cwd = tmpdir )
12901264 assert exitcode == 0 , stdout if stdout else stderr
12911265 lines = stdout .splitlines ()
1292- # TODO: only a single file should be checked
12931266 assert lines == [
1294- 'Checking {} ...' .format ('a.c' ),
1295- '1/6 files checked 16% done' ,
1296- 'Checking {} ...' .format ('a.c' ),
1297- '2/6 files checked 33% done' ,
1298- 'Checking {} ...' .format ('a.c' ),
1299- '3/6 files checked 50% done' ,
1300- 'Checking {} ...' .format (test_file_a ),
1301- '4/6 files checked 66% done' ,
1302- 'Checking {} ...' .format (test_file_a ),
1303- '5/6 files checked 83% done' ,
1304- 'Checking {} ...' .format (test_file_a ),
1305- '6/6 files checked 100% done'
1267+ 'Checking {} ...' .format ('a.c' )
13061268 ]
13071269 assert stderr == ''
13081270
0 commit comments