summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlois Mahdal <amahdal@redhat.com>2014-06-18 16:06:03 +0200
committerAlois Mahdal <amahdal@redhat.com>2014-06-18 18:52:46 +0200
commit469dda76664aff6086aab764493f68074be8e4f8 (patch)
treeb63ad65629835ceeb2b48d947871eb09efd9f34d
parent3f16fa68006b8734a626a2b6e300926079150c07 (diff)
downloadopenlmi-providers-469dda76664aff6086aab764493f68074be8e4f8.tar.gz
openlmi-providers-469dda76664aff6086aab764493f68074be8e4f8.tar.xz
openlmi-providers-469dda76664aff6086aab764493f68074be8e4f8.zip
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.
-rw-r--r--src/python/lmi/test/ind.py12
1 files 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):