Skip to content

Commit bc30d59

Browse files
amcndcbaker
authored andcommitted
meson command tests: clean up temporary script upon completion
1 parent 5102f43 commit bc30d59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

run_meson_command_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,13 @@ def test_meson_runpython(self):
206206
with open(script_file, 'w') as f:
207207
f.write('#!/usr/bin/env python3\n\n')
208208
f.write(f'{test_command}\n')
209+
self.addCleanup(os.remove, script_file)
209210

210211
for cmd in [['-c', test_command, 'fake argument'], [script_file, 'fake argument']]:
211212
pyout = self._run(python_command + cmd)
212213
mesonout = self._run(python_command + [meson_command, 'runpython'] + cmd, env=env)
213214
self.assertEqual(pyout, mesonout)
214215

215-
216216
if __name__ == '__main__':
217217
print('Meson build system', meson_version, 'Command Tests')
218218
raise SystemExit(unittest.main(buffer=True))

0 commit comments

Comments
 (0)