Skip to content

Commit 5f01232

Browse files
committed
tests/run-tests: Remove any 'expected' file from a unittest run.
This won't be generated normally, but a failed run (for example, from a unittest with an error or which doesn't call unittest.main()) will generate one. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <[email protected]>
1 parent 016ae19 commit 5f01232

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/run-tests.py

+2
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,8 @@ def run_one_test(test_file):
996996
if output_expected is not None:
997997
with open(filename_expected, "wb") as f:
998998
f.write(output_expected)
999+
else:
1000+
rm_f(filename_expected) # in case left over from previous failed run
9991001
with open(filename_mupy, "wb") as f:
10001002
f.write(output_mupy)
10011003
failed_tests.append((test_name, test_file))

0 commit comments

Comments
 (0)