summaryrefslogtreecommitdiff
path: root/testing/framework/TestCommon.py
diff options
context:
space:
mode:
Diffstat (limited to 'testing/framework/TestCommon.py')
-rw-r--r--testing/framework/TestCommon.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/testing/framework/TestCommon.py b/testing/framework/TestCommon.py
index f45b856e3..df005b341 100644
--- a/testing/framework/TestCommon.py
+++ b/testing/framework/TestCommon.py
@@ -796,6 +796,22 @@ class TestCommon(TestCmd):
# so this is an Aegis invocation; pass the test (exit 0).
self.pass_test()
+ @staticmethod
+ def detailed_diff(value, expect):
+ v_split = value.split('\n')
+ e_split = expect.split('\n')
+ if len(v_split) != len(e_split):
+ print("different number of lines:%d %d" % (len(v_split), len(e_split)))
+
+ # breakpoint()
+ for v, e in zip(v_split, e_split):
+ # print("%s:%s"%(v,e))
+ if v != e:
+ print("\n[%s]\n[%s]" % (v, e))
+
+ return "Expected:\n%s\nGot:\n%s" % (expect, value)
+
+
# Local Variables:
# tab-width:4
# indent-tabs-mode:nil