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 <angus@redyak.com.au>
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

Lines changed: 2 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy