Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1266)

Unified Diff: appengine/findit/crash/test/stacktrace_test_suite.py

Issue 2562623004: Making CallStack immutable, so it can be hashable (Closed)
Patch Set: Addressing nits Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/findit/crash/test/stacktrace_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/crash/test/stacktrace_test_suite.py
diff --git a/appengine/findit/crash/test/stacktrace_test_suite.py b/appengine/findit/crash/test/stacktrace_test_suite.py
index e617f9a5369560a30a01d5288b08ba863581767c..91ccbbe57757c5bf6e7ca48be51138be69996428 100644
--- a/appengine/findit/crash/test/stacktrace_test_suite.py
+++ b/appengine/findit/crash/test/stacktrace_test_suite.py
@@ -10,16 +10,22 @@ from crash.test.crash_testcase import CrashTestCase
class StacktraceTestSuite(CrashTestCase): #pragma: no cover.
def _VerifyTwoStackFramesEqual(self, frame1, frame2):
+ self.assertIsNotNone(frame1, "the first frame is unexpectedly missing")
+ self.assertIsNotNone(frame2, "the second frame is unexpectedly missing")
self.assertEqual(str(frame1), str(frame2))
self.assertEqual(frame1.dep_path, frame2.dep_path)
def _VerifyTwoCallStacksEqual(self, stack1, stack2):
- self.assertEqual(len(stack1), len(stack2))
+ self.assertIsNotNone(stack1, "the first stack is unexpectedly missing")
+ self.assertIsNotNone(stack2, "the second stack is unexpectedly missing")
+ self.assertEqual(len(stack1.frames), len(stack2.frames))
self.assertEqual(stack1.priority, stack2.priority)
self.assertEqual(stack1.format_type, stack2.format_type)
self.assertEqual(stack1.language_type, stack2.language_type)
- map(self._VerifyTwoStackFramesEqual, stack1, stack2)
+ map(self._VerifyTwoStackFramesEqual, stack1.frames, stack2.frames)
- def _VerifyTwoStacktracesEqual(self, stacktrace1, stacktrace2):
- self.assertEqual(len(stacktrace1), len(stacktrace2))
- map(self._VerifyTwoCallStacksEqual, stacktrace1, stacktrace2)
+ def _VerifyTwoStacktracesEqual(self, trace1, trace2):
+ self.assertIsNotNone(trace1, "the first trace is unexpectedly missing")
+ self.assertIsNotNone(trace2, "the second trace is unexpectedly missing")
+ self.assertEqual(len(trace1.stacks), len(trace2.stacks))
+ map(self._VerifyTwoCallStacksEqual, trace1.stacks, trace2.stacks)
« no previous file with comments | « appengine/findit/crash/test/stacktrace_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698