diff --git a/npf/test.py b/npf/test.py index bec61ac..27f3ed3 100755 --- a/npf/test.py +++ b/npf/test.py @@ -138,6 +138,7 @@ def get_scripts(self) -> List[SectionScript]: return self.scripts def get_pyexits(self) -> List[SectionPyExit]: + self.pyexits.sort(key=lambda p: f"{p.name}_{p.index}") return self.pyexits def __init__(self, test_path, options, tags=None, role=None, inline=None): @@ -929,7 +930,7 @@ def execute(self, build, run, v, n_runs=1, n_retry=0, allowed_types=SectionScrip all_pyexits = [] all_pyexits_v = [] for s,vlist in [(t.testie,t.imp_v) for t in self.imports] + [(self, v)]: - for p in sorted(s.get_pyexits()): + for p in s.get_pyexits(): all_pyexits.append(p) all_pyexits_v.append(vlist)