当前位置: 首页>>代码示例>>Python>>正文


Python JavaSignatureTool.generate方法代码示例

本文整理汇总了Python中socorro.processor.signature_utilities.JavaSignatureTool.generate方法的典型用法代码示例。如果您正苦于以下问题:Python JavaSignatureTool.generate方法的具体用法?Python JavaSignatureTool.generate怎么用?Python JavaSignatureTool.generate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在socorro.processor.signature_utilities.JavaSignatureTool的用法示例。


在下文中一共展示了JavaSignatureTool.generate方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_generate_signature_14_replace_address

# 需要导入模块: from socorro.processor.signature_utilities import JavaSignatureTool [as 别名]
# 或者: from socorro.processor.signature_utilities.JavaSignatureTool import generate [as 别名]
    def test_generate_signature_14_replace_address(self):
        config = DotDict()
        j = JavaSignatureTool(config)
        java_stack_trace = """android.view.WindowManager$BadTokenException: Unable to add window -- token [email protected] is not valid; is your activity running?
	at android.view.ViewRoot.setView(ViewRoot.java:533)
	at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:202)
	at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:116)
	at android.view.Window$LocalWindowManager.addView(Window.java:424)
	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2174)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1672)
	at android.app.ActivityThread.access$1500(ActivityThread.java:117)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:130)
	at android.app.ActivityThread.main(ActivityThread.java:3687)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:507)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
	at dalvik.system.NativeStart.main(Native Method)
"""
        sig, notes = j.generate(java_stack_trace, delimiter=': ')
        e = ('android.view.WindowManager$BadTokenException: '
             'Unable to add window -- token [email protected]<addr> '
             'is not valid; is your activity running? '
             'at android.view.ViewRoot.setView(ViewRoot.java)')
        assert_expected(e, sig)
        e = []
        assert_expected(e, notes)
开发者ID:erikrose,项目名称:socorro,代码行数:31,代码来源:test_signature_utilities.py

示例2: test_generate_signature_12_replace_address

# 需要导入模块: from socorro.processor.signature_utilities import JavaSignatureTool [as 别名]
# 或者: from socorro.processor.signature_utilities.JavaSignatureTool import generate [as 别名]
    def test_generate_signature_12_replace_address(self):
        config = DotDict()
        j = JavaSignatureTool(config)
        java_stack_trace = """java.lang.IllegalArgumentException: Given view not a child of [email protected]
	at android.view.ViewGroup.updateViewLayout(ViewGroup.java:1968)
	at org.mozilla.gecko.GeckoApp.repositionPluginViews(GeckoApp.java:1492)
	at org.mozilla.gecko.GeckoApp.repositionPluginViews(GeckoApp.java:1475)
	at org.mozilla.gecko.gfx.LayerController$2.run(LayerController.java:269)
	at android.os.Handler.handleCallback(Handler.java:587)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:150)
	at org.mozilla.gecko.GeckoApp$32.run(GeckoApp.java:1670)
	at android.os.Handler.handleCallback(Handler.java:587)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:150)
	at android.app.ActivityThread.main(ActivityThread.java:4293)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:507)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
	at dalvik.system.NativeStart.main(Native Method)"""
        sig, notes = j.generate(java_stack_trace, delimiter=': ')
        e = ('java.lang.IllegalArgumentException: '
             'Given view not a child of [email protected]<addr>: '
             'at android.view.ViewGroup.updateViewLayout(ViewGroup.java)')
        assert_expected(e, sig)
        e = []
        assert_expected(e, notes)
开发者ID:erikrose,项目名称:socorro,代码行数:30,代码来源:test_signature_utilities.py

示例3: test_generate_signature_13_replace_address

# 需要导入模块: from socorro.processor.signature_utilities import JavaSignatureTool [as 别名]
# 或者: from socorro.processor.signature_utilities.JavaSignatureTool import generate [as 别名]
    def test_generate_signature_13_replace_address(self):
        config = DotDict()
        j = JavaSignatureTool(config)
        java_stack_trace = """java.lang.IllegalArgumentException: Receiver not registered: [email protected]
	at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:628)
	at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1066)
	at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:354)
	at org.mozilla.gecko.GeckoConnectivityReceiver.unregisterFor(GeckoConnectivityReceiver.java:92)
	at org.mozilla.gecko.GeckoApp.onApplicationPause(GeckoApp.java:2104)
	at org.mozilla.gecko.GeckoApplication.onActivityPause(GeckoApplication.java:43)
	at org.mozilla.gecko.GeckoActivity.onPause(GeckoActivity.java:24)
	at android.app.Activity.performPause(Activity.java:4563)
	at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1195)
	at android.app.ActivityThread.performNewIntents(ActivityThread.java:2064)
	at android.app.ActivityThread.handleNewIntent(ActivityThread.java:2075)
	at android.app.ActivityThread.access$1400(ActivityThread.java:127)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:4441)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:511)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
	at dalvik.system.NativeStart.main(Native Method)"""
        sig, notes = j.generate(java_stack_trace, delimiter=': ')
        e = ('java.lang.IllegalArgumentException: '
             'Receiver not registered: '
             '[email protected]<addr>: '
             'at android.app.LoadedApk.forgetReceiverDispatcher'
             '(LoadedApk.java)')
        assert_expected(e, sig)
        e = []
        assert_expected(e, notes)
开发者ID:erikrose,项目名称:socorro,代码行数:36,代码来源:test_signature_utilities.py

示例4: test_generate_signature_8

# 需要导入模块: from socorro.processor.signature_utilities import JavaSignatureTool [as 别名]
# 或者: from socorro.processor.signature_utilities.JavaSignatureTool import generate [as 别名]
 def test_generate_signature_8(self):
     config = DotDict()
     j = JavaSignatureTool(config)
     java_stack_trace = 'SomeJavaException: totally made up  '
     sig, notes = j.generate(java_stack_trace, delimiter=': ')
     e = 'SomeJavaException: totally made up'
     assert_expected(e, sig)
     e = ['JavaSignatureTool: stack trace line 2 is missing']
     assert_expected(e, notes)
开发者ID:erikrose,项目名称:socorro,代码行数:11,代码来源:test_signature_utilities.py

示例5: test_generate_signature_7

# 需要导入模块: from socorro.processor.signature_utilities import JavaSignatureTool [as 别名]
# 或者: from socorro.processor.signature_utilities.JavaSignatureTool import generate [as 别名]
 def test_generate_signature_7(self):
     config = DotDict()
     j = JavaSignatureTool(config)
     java_stack_trace = 'SomeJavaException: totally made up  '
     sig, notes = j.generate(java_stack_trace, delimiter=': ')
     e = 'SomeJavaException: totally made up'
     self.assert_equal_with_nicer_output(e, sig)
     e = ['JavaSignatureTool: stack trace line 2 is missing']
     self.assert_equal_with_nicer_output(e, notes)
开发者ID:FishingCactus,项目名称:socorro,代码行数:11,代码来源:test_signature_utilities.py

示例6: test_generate_signature_1

# 需要导入模块: from socorro.processor.signature_utilities import JavaSignatureTool [as 别名]
# 或者: from socorro.processor.signature_utilities.JavaSignatureTool import generate [as 别名]
 def test_generate_signature_1(self):
     config = DotDict()
     j = JavaSignatureTool(config)
     java_stack_trace = 17
     sig, notes = j.generate(java_stack_trace, delimiter=': ')
     e = "EMPTY: Java stack trace not in expected format"
     assert_expected(e, sig)
     e = ['JavaSignatureTool: stack trace not '
          'in expected format']
     assert_expected(e, notes)
开发者ID:erikrose,项目名称:socorro,代码行数:12,代码来源:test_signature_utilities.py

示例7: test_generate_signature_3

# 需要导入模块: from socorro.processor.signature_utilities import JavaSignatureTool [as 别名]
# 或者: from socorro.processor.signature_utilities.JavaSignatureTool import generate [as 别名]
 def test_generate_signature_3(self):
     config = DotDict()
     j = JavaSignatureTool(config)
     java_stack_trace = ('SomeJavaException: totally made up  \n'
                         'at org.mozilla.lars.myInvention('
                         'larsFile.java)')
     sig, notes = j.generate(java_stack_trace, delimiter=': ')
     e = ('SomeJavaException: totally made up '
          'at org.mozilla.lars.myInvention('
          'larsFile.java)')
     assert_expected(e, sig)
     e = []
     assert_expected(e, notes)
开发者ID:erikrose,项目名称:socorro,代码行数:15,代码来源:test_signature_utilities.py

示例8: test_generate_signature_2

# 需要导入模块: from socorro.processor.signature_utilities import JavaSignatureTool [as 别名]
# 或者: from socorro.processor.signature_utilities.JavaSignatureTool import generate [as 别名]
 def test_generate_signature_2(self):
     config = DotDict()
     j = JavaSignatureTool(config)
     java_stack_trace = ('SomeJavaException: totally made up  \n'
                         'at org.mozilla.lars.myInvention('
                         'larsFile.java:666)')
     sig, notes = j.generate(java_stack_trace, delimiter=': ')
     e = ('SomeJavaException: totally made up '
          'at org.mozilla.lars.myInvention('
          'larsFile.java)')
     self.assert_equal_with_nicer_output(e, sig)
     e = []
     self.assert_equal_with_nicer_output(e, notes)
开发者ID:FishingCactus,项目名称:socorro,代码行数:15,代码来源:test_signature_utilities.py

示例9: test_generate_signature_5

# 需要导入模块: from socorro.processor.signature_utilities import JavaSignatureTool [as 别名]
# 或者: from socorro.processor.signature_utilities.JavaSignatureTool import generate [as 别名]
 def test_generate_signature_5(self):
     config = DotDict()
     j = JavaSignatureTool(config)
     java_stack_trace = ('   SomeJavaException\n'
                         'at org.mozilla.lars.myInvention('
                         'larsFile.java:1234)')
     sig, notes = j.generate(java_stack_trace, delimiter=': ')
     e = ('SomeJavaException: '
          'at org.mozilla.lars.myInvention('
          'larsFile.java)')
     assert_expected(e, sig)
     e = ['JavaSignatureTool: stack trace line 1 is '
          'not in the expected format']
     assert_expected(e, notes)
开发者ID:erikrose,项目名称:socorro,代码行数:16,代码来源:test_signature_utilities.py

示例10: test_generate_signature_4_2

# 需要导入模块: from socorro.processor.signature_utilities import JavaSignatureTool [as 别名]
# 或者: from socorro.processor.signature_utilities.JavaSignatureTool import generate [as 别名]
 def test_generate_signature_4_2(self):
     config = DotDict()
     j = JavaSignatureTool(config)
     java_stack_trace = ('   SomeJavaException: %s  \n'
                         'at org.mozilla.lars.myInvention('
                         'larsFile.java:1234)' % ('t'*1000))
     sig, notes = j.generate(java_stack_trace, delimiter=': ')
     e = ('SomeJavaException: '
          'at org.mozilla.lars.myInvention('
          'larsFile.java)')
     assert_expected(e, sig)
     e = ['JavaSignatureTool: dropped Java exception description due to '
          'length']
     assert_expected(e, notes)
开发者ID:erikrose,项目名称:socorro,代码行数:16,代码来源:test_signature_utilities.py

示例11: test_generate_signature_9

# 需要导入模块: from socorro.processor.signature_utilities import JavaSignatureTool [as 别名]
# 或者: from socorro.processor.signature_utilities.JavaSignatureTool import generate [as 别名]
 def test_generate_signature_9(self):
     config = DotDict()
     j = JavaSignatureTool(config)
     java_stack_trace = ('   SomeJavaException: totally made up  \n'
                         'at org.mozilla.lars.myInvention('
                         '%slarsFile.java:1234)' % ('t'*1000))
     sig, notes = j.generate(java_stack_trace, delimiter=': ')
     e = ('SomeJavaException: '
          'at org.mozilla.lars.myInvention('
          '%s...' % ('t' * 201))
     assert_expected(e, sig)
     e = ['JavaSignatureTool: dropped Java exception description due to '
          'length',
          'SignatureTool: signature truncated due to length']
     assert_expected(e, notes)
开发者ID:erikrose,项目名称:socorro,代码行数:17,代码来源:test_signature_utilities.py

示例12: test_generate_signature_10_no_interference

# 需要导入模块: from socorro.processor.signature_utilities import JavaSignatureTool [as 别名]
# 或者: from socorro.processor.signature_utilities.JavaSignatureTool import generate [as 别名]
 def test_generate_signature_10_no_interference(self):
     """In general addresses of the form @xxxxxxxx are to be replaced with
     the literal "<addr>", however in this case, the hex address is not in
     the expected location and should therefore be left alone"""
     config = DotDict()
     j = JavaSignatureTool(config)
     java_stack_trace = ('SomeJavaException: totally made up  \n'
                         'at org.mozilla.lars.myInvention('
                         'larsFile.java:@abef1234)')
     sig, notes = j.generate(java_stack_trace, delimiter=' ')
     e = ('SomeJavaException totally made up '
          'at org.mozilla.lars.myInvention('
          'larsFile.java:@abef1234)')
     self.assert_equal_with_nicer_output(e, sig)
     self.assert_equal_with_nicer_output([], notes)
开发者ID:FishingCactus,项目名称:socorro,代码行数:17,代码来源:test_signature_utilities.py

示例13: test_generate_signature_15_replace_address

# 需要导入模块: from socorro.processor.signature_utilities import JavaSignatureTool [as 别名]
# 或者: from socorro.processor.signature_utilities.JavaSignatureTool import generate [as 别名]
    def test_generate_signature_15_replace_address(self):
        config = DotDict()
        j = JavaSignatureTool(config)
        java_stack_trace = """java.lang.IllegalArgumentException: Receiver not registered: [email protected]
	at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:610)
	at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:883)
	at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:331)
	at org.mozilla.gecko.GeckoNetworkManager.stopListening(GeckoNetworkManager.java:141)
	at org.mozilla.gecko.GeckoNetworkManager.stop(GeckoNetworkManager.java:136)
	at org.mozilla.gecko.GeckoApp.onApplicationPause(GeckoApp.java:2130)
	at org.mozilla.gecko.GeckoApplication.onActivityPause(GeckoApplication.java:55)
	at org.mozilla.gecko.GeckoActivity.onPause(GeckoActivity.java:22)
	at org.mozilla.gecko.GeckoApp.onPause(GeckoApp.java:1948)
	at android.app.Activity.performPause(Activity.java:3877)
	at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1191)
	at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2345)
	at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2315)
	at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2295)
	at android.app.ActivityThread.access$1700(ActivityThread.java:117)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:942)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:130)
	at android.app.ActivityThread.main(ActivityThread.java:3691)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:507)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
	at dalvik.system.NativeStart.main(Native Method)
"""
        sig, notes = j.generate(java_stack_trace, delimiter=': ')
        e = ('java.lang.IllegalArgumentException: '
             'Receiver not registered: '
             '[email protected]<addr>: '
             'at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java)')
        assert_expected(e, sig)
        e = []
        assert_expected(e, notes)
开发者ID:erikrose,项目名称:socorro,代码行数:39,代码来源:test_signature_utilities.py


注:本文中的socorro.processor.signature_utilities.JavaSignatureTool.generate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。