本文整理汇总了Python中socorro.processor.skunk_classifiers.SkunkClassificationRule类的典型用法代码示例。如果您正苦于以下问题:Python SkunkClassificationRule类的具体用法?Python SkunkClassificationRule怎么用?Python SkunkClassificationRule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SkunkClassificationRule类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_action
def test_action(self):
rc = DotDict()
pc = DotDict()
processor = None
skunk_rule = SkunkClassificationRule()
ok_(skunk_rule.action(rc, pc, processor))
开发者ID:JamJar,项目名称:socorro,代码行数:7,代码来源:test_skunk_classifiers.py
示例2: test_stack_contains
def test_stack_contains(self):
stack = cannonical_json_dump['threads'][1]['frames']
skunk_rule = SkunkClassificationRule()
ok_(
skunk_rule._stack_contains(
stack,
'ha_',
c_signature_tool,
cache_normalizations=False
),
)
ok_(not
skunk_rule._stack_contains(
stack,
'heh_',
c_signature_tool,
cache_normalizations=False
),
)
ok_(not 'normalized' in stack[0])
ok_(
skunk_rule._stack_contains(
stack,
'ha_ha2',
c_signature_tool,
),
)
ok_('normalized' in stack[0])
开发者ID:JisJis,项目名称:socorro,代码行数:29,代码来源:test_skunk_classifiers.py
示例3: test_add_classification_to_processed_crash
def test_add_classification_to_processed_crash(self):
rc = DotDict()
pc = DotDict()
pc.classifications = DotDict()
processor = None
skunk_rule = SkunkClassificationRule()
skunk_rule._add_classification(
pc,
'stupid',
'extra stuff'
)
self.assertTrue('classifications' in pc)
self.assertTrue('skunk_works' in pc.classifications)
self.assertEqual(
'stupid',
pc.classifications.skunk_works.classification
)
self.assertEqual(
'extra stuff',
pc.classifications.skunk_works.classification_data
)
self.assertEqual(
'0.0',
pc.classifications.skunk_works.classification_version
)
开发者ID:FishingCactus,项目名称:socorro,代码行数:26,代码来源:test_skunk_classifiers.py
示例4: test_stack_contains
def test_stack_contains(self):
stack = cannonical_json_dump["threads"][1]["frames"]
skunk_rule = SkunkClassificationRule()
ok_(skunk_rule._stack_contains(stack, "ha_", c_signature_tool, cache_normalizations=False))
ok_(not skunk_rule._stack_contains(stack, "heh_", c_signature_tool, cache_normalizations=False))
ok_(not "normalized" in stack[0])
ok_(skunk_rule._stack_contains(stack, "ha_ha2", c_signature_tool))
ok_("normalized" in stack[0])
开发者ID:JamJar,项目名称:socorro,代码行数:9,代码来源:test_skunk_classifiers.py
示例5: test_add_classification_to_processed_crash
def test_add_classification_to_processed_crash(self):
pc = DotDict()
pc.classifications = DotDict()
skunk_rule = SkunkClassificationRule()
skunk_rule._add_classification(pc, "stupid", "extra stuff")
ok_("classifications" in pc)
ok_("skunk_works" in pc.classifications)
eq_("stupid", pc.classifications.skunk_works.classification)
eq_("extra stuff", pc.classifications.skunk_works.classification_data)
eq_("0.0", pc.classifications.skunk_works.classification_version)
开发者ID:JamJar,项目名称:socorro,代码行数:11,代码来源:test_skunk_classifiers.py
示例6: test_predicate
def test_predicate(self):
rc = DotDict()
pc = DotDict()
pc.classifications = DotDict()
processor = None
skunk_rule = SkunkClassificationRule()
ok_(skunk_rule.predicate(rc, pc, processor))
pc.classifications.skunk_works = DotDict()
ok_(skunk_rule.predicate(rc, pc, processor))
pc.classifications.skunk_works.classification = "stupid"
ok_(not skunk_rule.predicate(rc, pc, processor))
开发者ID:JamJar,项目名称:socorro,代码行数:14,代码来源:test_skunk_classifiers.py
示例7: test_predicate
def test_predicate(self):
rc = DotDict()
pc = DotDict()
pc.classifications = DotDict()
processor = None
skunk_rule = SkunkClassificationRule()
self.assertTrue(skunk_rule.predicate(rc, pc, processor))
pc.classifications.skunk_works = DotDict()
self.assertTrue(skunk_rule.predicate(rc, pc, processor))
pc.classifications.skunk_works.classification = 'stupid'
self.assertFalse(skunk_rule.predicate(rc, pc, processor))
开发者ID:FishingCactus,项目名称:socorro,代码行数:14,代码来源:test_skunk_classifiers.py
示例8: test_get_stack
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,代码行数:17,代码来源:test_skunk_classifiers.py
示例9: test_get_stack
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,代码行数:21,代码来源:test_skunk_classifiers.py
示例10: test_add_classification_to_processed_crash
def test_add_classification_to_processed_crash(self):
pc = DotDict()
pc.classifications = DotDict()
skunk_rule = SkunkClassificationRule()
skunk_rule._add_classification(
pc,
'stupid',
'extra stuff'
)
ok_('classifications' in pc)
ok_('skunk_works' in pc.classifications)
eq_(
'stupid',
pc.classifications.skunk_works.classification
)
eq_(
'extra stuff',
pc.classifications.skunk_works.classification_data
)
eq_(
'0.0',
pc.classifications.skunk_works.classification_version
)
开发者ID:JisJis,项目名称:socorro,代码行数:24,代码来源:test_skunk_classifiers.py
示例11: test_version
def test_version(self):
skunk_rule = SkunkClassificationRule()
eq_(skunk_rule.version(), "0.0")
开发者ID:JamJar,项目名称:socorro,代码行数:3,代码来源:test_skunk_classifiers.py
示例12: test_version
def test_version(self):
skunk_rule = SkunkClassificationRule()
self.assertEqual(skunk_rule.version(), '0.0')
开发者ID:FishingCactus,项目名称:socorro,代码行数:3,代码来源:test_skunk_classifiers.py
注:本文中的socorro.processor.skunk_classifiers.SkunkClassificationRule类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论