From 761421a148a1c4c698d54fd84222800ca90a5dd7 Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Sun, 14 Jun 2020 20:54:16 -0700 Subject: [PATCH] Made func_coverace.py more robust. --- scripts/func_coverage.py | 10 ++++++---- version.scad | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/func_coverage.py b/scripts/func_coverage.py index 3dbb060..85d0a7b 100755 --- a/scripts/func_coverage.py +++ b/scripts/func_coverage.py @@ -27,10 +27,12 @@ for filename in os.listdir("tests"): with open(filepath, "r") as f: for line in f.readlines(): if line.startswith("module "): - funcname = line[7:].strip().split("(")[0].strip().split("_",1)[1] - if funcname in uncovered: - covered.append(funcname) - del uncovered[funcname] + testmodule = line[7:].strip().split("(")[0].strip() + if testmodule.startswith("test_"): + funcname = testmodule.split("_",1)[1] + if funcname in uncovered: + covered.append(funcname) + del uncovered[funcname] uncovered_by_file = {} for funcname in sorted(list(uncovered.keys())): diff --git a/version.scad b/version.scad index 1b02266..c8ed135 100644 --- a/version.scad +++ b/version.scad @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,335]; +BOSL_VERSION = [2,0,336]; // Section: BOSL Library Version Functions