From 5be14f5e892b79fceeac546e8d2db3ec5c3e8e2d Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Mon, 13 Apr 2020 18:02:03 +0100 Subject: [PATCH] Fixed bug updating the times file when case changes. First column split of vitamins now at J. --- scripts/tests.py | 4 ++-- scripts/times.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/tests.py b/scripts/tests.py index 3590b94..56468f7 100755 --- a/scripts/tests.py +++ b/scripts/tests.py @@ -147,7 +147,7 @@ def tests(tests): print("Can't find implementation!") continue - vsplit = "AKR" + chr(ord('Z') + 1) + vsplit = "AJR" + chr(ord('Z') + 1) vtype = locations[0][1] types = [vtype + ' ' + vsplit[i] + '-' + chr(ord(vsplit[i + 1]) - 1) for i in range(len(vsplit) - 1)] + [loc[1] for loc in locations[1 :]] if type == vtype: @@ -201,7 +201,7 @@ def tests(tests): dname = deps_name(deps_dir, scad.lower()) oldest = png_name if mtime(png_name) < mtime(bom_name) else bom_name changed = check_deps(oldest, dname) - changed = times.check_have_time(changed, scad_name.lower()) + changed = times.check_have_time(changed, scad_name) changed = options.have_changed(changed, oldest) if changed: print(changed) diff --git a/scripts/times.py b/scripts/times.py index 331c399..4eeedb3 100644 --- a/scripts/times.py +++ b/scripts/times.py @@ -48,6 +48,8 @@ def check_have_time(changed, name): return changed def add_time(name, start): + if name.lower() in times: + del times[name.lower()] times[name] = round(time.time() - start, 3) def print_times():