diff --git a/unitgrade/__pycache__/__init__.cpython-36.pyc b/unitgrade/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..845822da1bc18d27e8c2481f064c69b63907c5ec Binary files /dev/null and b/unitgrade/__pycache__/__init__.cpython-36.pyc differ diff --git a/unitgrade/__pycache__/unitgrade.cpython-36.pyc b/unitgrade/__pycache__/unitgrade.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e06afc97e8a0e65c9dcb389f7959e83085e93cfc Binary files /dev/null and b/unitgrade/__pycache__/unitgrade.cpython-36.pyc differ diff --git a/unitgrade/__pycache__/unitgrade_helpers.cpython-36.pyc b/unitgrade/__pycache__/unitgrade_helpers.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..67d4c848842dfb3200eed7be396d9e59b3640d57 Binary files /dev/null and b/unitgrade/__pycache__/unitgrade_helpers.cpython-36.pyc differ diff --git a/unitgrade/unitgrade.py b/unitgrade/unitgrade.py index b3263988da482866109473448db268be6cd4f32e..8b6496e26c1311b62990f0c1fa9a791417f4dfdb 100644 --- a/unitgrade/unitgrade.py +++ b/unitgrade/unitgrade.py @@ -254,14 +254,18 @@ class Report(): if "precomputed" in payloads[q.name][item.name]: item._precomputed_payload = payloads[q.name][item.name]['precomputed'] + def rm_progress_bar(txt): + # More robust version. Apparently length of bar can depend on various factors, so check for order of symbols. nlines = [] for l in txt.splitlines(): - i = l.find("|") - if i >0 and l[i+11] == "|": - pass - # print(l) - else: + pct = l.find("%") + ql = False + if pct > 0: + i = l.find("|", pct+1) + if i > 0 and l.find("|", i+1) > 0: + ql = True + if not ql: nlines.append(l) return "\n".join(nlines) @@ -272,5 +276,7 @@ def extract_numbers(txt): all = rx.findall(txt) all = [float(a) if ('.' in a or "e" in a) else int(a) for a in all] if len(all) > 100: + print(txt) + raise Exception("unitgrade.unitgrade.py: Warning, many numbers!", len(all)) return all