From 469dda76664aff6086aab764493f68074be8e4f8 Mon Sep 17 00:00:00 2001 From: Alois Mahdal Date: Wed, 18 Jun 2014 16:06:03 +0200 Subject: Sort reports before extracting info from them This is how it was supposed to be in the first place (and how I incorrectly presented the framework so far). Apparently I forgot to add the sorting call. --- src/python/lmi/test/ind.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/python/lmi/test/ind.py b/src/python/lmi/test/ind.py index e722336..dc4e900 100644 --- a/src/python/lmi/test/ind.py +++ b/src/python/lmi/test/ind.py @@ -222,8 +222,9 @@ class IndicationTestProbe(object): Get sequence of class names aliases delivered to probe Return string describing sequence of class names found - in probe reports. The string follows notation used by - lmi.test.util.PackedSequence. + in probe reports and sorted by time as reported in the + indication itself (IndicationTime). The string follows + notation used by lmi.test.util.PackedSequence. The string does not use full names, but their "aliases" as defined in classname_aliases dictionary. This is to @@ -231,7 +232,7 @@ class IndicationTestProbe(object): understand case definitions. """ ps = lmi.test.util.PackedSequence() - for rep in self.indication_reports: + for rep in sorted(self.indication_reports): cn = rep.ind.exported_objects()[0].classname try: ps.append(self.classname_aliases[cn]) @@ -244,11 +245,12 @@ class IndicationTestProbe(object): Get sequence of action names delivered to probe. Return string describing sequence of action names found - in probe reports. The string follows notation used by + in probe reports, sorted in order as they were triggered. + The string follows notation used by lmi.test.util.PackedSequence. """ ps = lmi.test.util.PackedSequence() - [ps.append(r.action) for r in self.action_reports] + [ps.append(r.action) for r in sorted(self.action_reports)] return str(ps) def report_indication(self, ind, args, kwargs): -- cgit