本文整理汇总了Python中socorrolib.lib.util.DotDict.cpu_name方法的典型用法代码示例。如果您正苦于以下问题:Python DotDict.cpu_name方法的具体用法?Python DotDict.cpu_name怎么用?Python DotDict.cpu_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类socorrolib.lib.util.DotDict
的用法示例。
在下文中一共展示了DotDict.cpu_name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_wrong_signature
# 需要导入模块: from socorrolib.lib.util import DotDict [as 别名]
# 或者: from socorrolib.lib.util.DotDict import cpu_name [as 别名]
def test_wrong_signature(self, mocked_subprocess_module):
config = self.get_basic_config()
raw_crash = copy.copy(canonical_standard_raw_crash)
raw_dumps = {config.dump_field: 'a_fake_dump.dump'}
processed_crash = DotDict()
processed_crash.product = 'Firefox'
processed_crash.os_name = 'Windows NT'
processed_crash.cpu_name = 'x86'
processed_crash.signature = 'this-is-not-a-JIT-signature'
processed_crash['json_dump.crashing_thread.frames'] = [
DotDict({'not_module': 'not-a-module',}),
DotDict({'module': 'a-module',})
]
processor_meta = self.get_basic_processor_meta()
mocked_subprocess_handle = (
mocked_subprocess_module.Popen.return_value
)
mocked_subprocess_handle.stdout.read.return_value = (
'EXTRA-SPECIAL'
)
mocked_subprocess_handle.wait.return_value = 0
rule = JitCrashCategorizeRule(config)
# the call to be tested
rule.act(raw_crash, raw_dumps, processed_crash, processor_meta)
ok_('classifications.jit.category' not in processed_crash)
ok_('classifications.jit.category_return_code' not in processed_crash)