Commit d79d26e3 authored by Jan Kiene's avatar Jan Kiene
Browse files

fix format and category keys missing in split case

parent 515f6f9b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ from typing import List
BINS_FOR_MEASURES = {
    "MLD": [0, 1, 2, 3, 4, 5, 10, 20, math.inf],
    "MAX_ABS_DIFF": [0, 16, 256, 1024, 2048, 4096, 8192, 16384, 32769],
    "MIN_SSNR": [-math.inf, 0, 10, 20, 30, 40, 40, 50, 60, 100],
    "MIN_SSNR": [-math.inf, 0, 10, 20, 30, 40, 40, 50, 60, 100, math.inf],
    "MIN_ODG": [-5, -4, -3, -2, -1, -0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.5],
    "DELTA_ODG": [-5, -4, -3, -2, -1, -0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.5],
}
+8 −0
Original line number Diff line number Diff line
@@ -54,6 +54,11 @@ class TestcaseParser(dict):
        ### handle split comparison results
        split_props = {k: v for k, v in properties.items() if SPLIT_STRING in k}
        whole_props = {k: v for k, v in properties.items() if WHOLE_STRING in k}
        other_props = {
            k: v
            for k, v in properties.items()
            if WHOLE_STRING not in k and SPLIT_STRING not in k
        }

        if len(split_props) > 0 and len(whole_props) > 0:
            measures_from_split = set(
@@ -83,6 +88,8 @@ class TestcaseParser(dict):
                ret_split = {"testcase": fulltestname, "split": s}
                for m in measures:
                    ret_split.update({m: split_props[m + SPLIT_STRING + f"{s}"]})

                ret_split.update(other_props)
                self[split_key] = ret_split

        # it can be the case that there are no splits defined in the pytest suite, e.g. for the renderer
@@ -93,6 +100,7 @@ class TestcaseParser(dict):
                k.replace(WHOLE_STRING, ""): v for k, v in whole_props.items()
            }
            properties["split"] = "whole"
            properties.update(other_props)

        ret.update(properties)
        self[fulltestname] = ret