本文整理匯總了Python中socorro.processor.skunk_classifiers.SkunkClassificationRule._get_stack方法的典型用法代碼示例。如果您正苦於以下問題:Python SkunkClassificationRule._get_stack方法的具體用法?Python SkunkClassificationRule._get_stack怎麽用?Python SkunkClassificationRule._get_stack使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類socorro.processor.skunk_classifiers.SkunkClassificationRule
的用法示例。
在下文中一共展示了SkunkClassificationRule._get_stack方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_get_stack
# 需要導入模塊: from socorro.processor.skunk_classifiers import SkunkClassificationRule [as 別名]
# 或者: from socorro.processor.skunk_classifiers.SkunkClassificationRule import _get_stack [as 別名]
def test_get_stack(self):
pc = DotDict()
pc.process_type = "plugin"
skunk_rule = SkunkClassificationRule()
ok_(not skunk_rule._get_stack(pc, "upload_file_minidump_plugin"))
pc.json_dump = DotDict()
pc.json_dump.threads = []
ok_(not skunk_rule._get_stack(pc, "upload_file_minidump_plugin"))
pc.json_dump.crash_info = DotDict()
pc.json_dump.crash_info.crashing_thread = 1
ok_(not skunk_rule._get_stack(pc, "upload_file_minidump_plugin"))
pc.json_dump = cannonical_json_dump
eq_(skunk_rule._get_stack(pc, "upload_file_minidump_plugin"), cannonical_json_dump["crashing_thread"]["frames"])
示例2: test_get_stack
# 需要導入模塊: from socorro.processor.skunk_classifiers import SkunkClassificationRule [as 別名]
# 或者: from socorro.processor.skunk_classifiers.SkunkClassificationRule import _get_stack [as 別名]
def test_get_stack(self):
pc = DotDict()
pc.process_type = 'plugin'
skunk_rule = SkunkClassificationRule()
processor = DotDict()
self.assertFalse(skunk_rule._get_stack(pc, 'upload_file_minidump_plugin'))
pc.json_dump = DotDict()
pc.json_dump.threads = []
self.assertFalse(skunk_rule._get_stack(pc, 'upload_file_minidump_plugin'))
pc.json_dump.crash_info = DotDict()
pc.json_dump.crash_info.crashing_thread = 1
self.assertFalse(skunk_rule._get_stack(pc, 'upload_file_minidump_plugin'))
pc.json_dump = cannonical_json_dump
self.assertEqual(
skunk_rule._get_stack(pc, 'upload_file_minidump_plugin'),
cannonical_json_dump['crashing_thread']['frames']
)