From e995a78efbee8d4869dad42b7e28e39ba1f8b262 Mon Sep 17 00:00:00 2001 From: alexmadison Date: Fri, 1 Apr 2022 20:54:27 +0200 Subject: [PATCH] dunno what i changed buti it was probably good --- test/prsim_plot.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/prsim_plot.py b/test/prsim_plot.py index 36a83db..a71f19b 100755 --- a/test/prsim_plot.py +++ b/test/prsim_plot.py @@ -102,7 +102,7 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""") # Get list of all times (before filtering) unique_times = np.unique([int(e[0]) for e in entries]) - assert not (exclude_given and include_given), "Can't give include and exclude re simultaneously." + # assert not (exclude_given and include_given), "Can't give include and exclude re simultaneously." if include_given: print(f"Including signals that match regex {include_re}") if exclude_given: print(f"Excluding signals that match regex {exclude_re}") @@ -225,8 +225,8 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""") ax.text(time_to_index(time), num_sigs, time, ha = "center", va = "top", size = 10, rotation = 90) # Find and plot wrong Assert statements - asserts = re.findall(r"\t *(\d+) .*\nWRONG ASSERT:\t(.+)", f) - if len(asserts): print("Failed asserts found!") + asserts = re.findall(r"\t *(\d+) .*\n(WRONG ASSERT|WARNING):\t?(.+)", f) + if len(asserts): print("Warnings found!") for a in asserts: print(a) time = int(a[0]) @@ -234,11 +234,11 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""") try: time = unique_times[np.argwhere((unique_times-time) < 0)[-1]] except: - print(f"Couldn't find an appropriate time for assert {a}") + print(f"Couldn't find an appropriate time for warning {a}") continue index = time_to_index(time) ax.axvline(index+0.5, c = "red", lw = 2) - ax.text(index+0.5, -1, a[1], rotation = 90, ha = "center", va = "bottom", c = "red") + ax.text(index+0.5, -1, a[2], rotation = 90, ha = "center", va = "bottom", c = "red") # Find echoed statements of the form "[digits] text" echoes = re.findall(r"\t *(\d+) [^\t]*\n(\[\d*\].+)", f)