commit 9b5e2295a2217081cf772ce3b0f24f88eb3dac34 Author: Damian Johnson atagar@torproject.org Date: Sat Jan 28 12:06:29 2012 -0800
Providing higher test runtime accuracy if low
It looks kinda odd to say that the unit testing runtime is "0 seconds", so raising the accuracy when the runtime is less than a second. --- run_tests.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/run_tests.py b/run_tests.py index 8467e2f..755eda3 100755 --- a/run_tests.py +++ b/run_tests.py @@ -314,7 +314,9 @@ if __name__ == '__main__':
# TODO: note unused config options afterward?
- runtime_label = "(%i seconds)" % (time.time() - start_time) + runtime = time.time() - start_time + if runtime < 1: runtime_label = "(%0.1f seconds)" % runtime + else: runtime_label = "(%i seconds)" % runtime
if error_tracker.has_error_occured(): test.output.print_line("TESTING FAILED %s" % runtime_label, term.Color.RED, term.Attr.BOLD)
tor-commits@lists.torproject.org