當前位置: 首頁>>代碼示例>>Python>>正文


Python SkunkClassificationRule._get_stack方法代碼示例

本文整理匯總了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"])
開發者ID:JamJar,項目名稱:socorro,代碼行數:19,代碼來源:test_skunk_classifiers.py

示例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']
        )
開發者ID:FishingCactus,項目名稱:socorro,代碼行數:23,代碼來源:test_skunk_classifiers.py


注:本文中的socorro.processor.skunk_classifiers.SkunkClassificationRule._get_stack方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。