From fbebf94cec703ae6ca839f0d5ea9ecae7f6cabdf Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 21 Feb 2003 07:49:14 +0000 Subject: [PATCH] Really start the last failed test as soon as possible. [SVN r17568] --- test/test_all.py | 6 +++++- v2/test/test_all.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/test/test_all.py b/test/test_all.py index b2f8f6b2b..9c408c0e9 100644 --- a/test/test_all.py +++ b/test/test_all.py @@ -26,13 +26,17 @@ def run_tests(critical_tests, other_tests): other_tests = reorder_tests(other_tests, last_failed) all_tests = critical_tests + other_tests + invocation_dir = os.getcwd() + for i in all_tests: print ("%-25s : " %(i)), try: __import__(i) except: print "FAILED" - open('test_results.txt', 'w').write(i) + f = open(os.path.join(invocation_dir, 'test_results.txt'), 'w') + f.write(i) + f.close() raise print "PASSED" # Erase the file on success diff --git a/v2/test/test_all.py b/v2/test/test_all.py index b2f8f6b2b..9c408c0e9 100644 --- a/v2/test/test_all.py +++ b/v2/test/test_all.py @@ -26,13 +26,17 @@ def run_tests(critical_tests, other_tests): other_tests = reorder_tests(other_tests, last_failed) all_tests = critical_tests + other_tests + invocation_dir = os.getcwd() + for i in all_tests: print ("%-25s : " %(i)), try: __import__(i) except: print "FAILED" - open('test_results.txt', 'w').write(i) + f = open(os.path.join(invocation_dir, 'test_results.txt'), 'w') + f.write(i) + f.close() raise print "PASSED" # Erase the file on success