diff --git a/run_all.py b/run_all.py index 3d86edd..185c400 100644 --- a/run_all.py +++ b/run_all.py @@ -5,11 +5,11 @@ from os.path import isdir, isfile from subprocess import Popen, PIPE, CalledProcessError from time import time - +total_run_time = 0 for dir in [x for x in sorted(listdir('.')) if isdir(x)]: file = dir + '/' + dir + '.py' input = dir + '/input.txt' - total_run_time = 0 + if isfile(file) and isfile(input): print('--------------------------------') print(dir, ':', sep='') @@ -23,5 +23,5 @@ for dir in [x for x in sorted(listdir('.')) if isdir(x)]: run_time = end_time-start_time total_run_time += run_time print(f'Runtime: {run_time:.2f} s') - print('--------------------------------') - print(f'Runtime: {total_run_time:.2f} s') +print('--------------------------------') +print(f'Runtime: {total_run_time:.2f} s')