Skip to content

Commit ace8834

Browse files
committed
do not explicitly remove files in Python tests
1 parent 7defac7 commit ace8834

2 files changed

Lines changed: 0 additions & 4 deletions

File tree

test/cli/clang-import_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def __check_symbol_database(tmpdir, code):
4848
f.write(code)
4949
ret1, stdout1, _ = cppcheck(['--clang', '--debug', '-v', testfile])
5050
ret2, stdout2, _ = cppcheck(['--debug', '-v', testfile])
51-
os.remove(testfile)
5251
assert 0 == ret1, stdout1
5352
assert 0 == ret2, stdout2
5453
assert __get_debug_section('### Symbol database', stdout1) == __get_debug_section('### Symbol database', stdout2)
@@ -60,7 +59,6 @@ def __check_ast(tmpdir, code):
6059
f.write(code)
6160
ret1, stdout1, _ = cppcheck(['--clang', '--debug', '-v', testfile])
6261
ret2, stdout2, _ = cppcheck(['--debug', '-v', testfile])
63-
os.remove(testfile)
6462
assert 0 == ret1, stdout1
6563
assert 0 == ret2, stdout1
6664
assert __get_debug_section('##AST', stdout1) == __get_debug_section('##AST', stdout2)

test/tools/htmlreport/test_htmlreport.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ def runCheck(source_filename=None, xml_version='1', xml_filename=None):
108108

109109
yield index_contents, output_directory
110110

111-
shutil.rmtree(output_directory)
112-
113111

114112
if __name__ == '__main__':
115113
unittest.main()

0 commit comments

Comments
 (0)