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


Python Stacktrace.get_hash方法代码示例

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


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

示例1: test_get_hash_ignores_filename_if_https

# 需要导入模块: from sentry.interfaces import Stacktrace [as 别名]
# 或者: from sentry.interfaces.Stacktrace import get_hash [as 别名]
 def test_get_hash_ignores_filename_if_https(self):
     interface = Stacktrace(frames=[{
         'context_line': 'hello world',
         'filename': 'https://foo.com/foo.py',
     }])
     result = interface.get_hash()
     self.assertEquals(result, ['hello world'])
开发者ID:DouweM,项目名称:sentry,代码行数:9,代码来源:tests.py

示例2: test_get_hash_with_only_required_vars

# 需要导入模块: from sentry.interfaces import Stacktrace [as 别名]
# 或者: from sentry.interfaces.Stacktrace import get_hash [as 别名]
 def test_get_hash_with_only_required_vars(self):
     interface = Stacktrace(frames=[{
         'lineno': 1,
         'filename': 'foo.py',
     }])
     result = interface.get_hash()
     self.assertEquals(result, ['foo.py', 1])
开发者ID:Crowdbooster,项目名称:sentry,代码行数:9,代码来源:tests.py

示例3: test_get_hash_uses_function_over_lineno

# 需要导入模块: from sentry.interfaces import Stacktrace [as 别名]
# 或者: from sentry.interfaces.Stacktrace import get_hash [as 别名]
 def test_get_hash_uses_function_over_lineno(self):
     interface = Stacktrace(frames=[{
         'lineno': 1,
         'filename': 'foo.py',
         'function': 'bar'
     }])
     result = interface.get_hash()
     self.assertEquals(result, ['foo.py', 'bar'])
开发者ID:Crowdbooster,项目名称:sentry,代码行数:10,代码来源:tests.py

示例4: test_get_hash_uses_module_over_filename

# 需要导入模块: from sentry.interfaces import Stacktrace [as 别名]
# 或者: from sentry.interfaces.Stacktrace import get_hash [as 别名]
 def test_get_hash_uses_module_over_filename(self):
     interface = Stacktrace(frames=[{
         'lineno': 1,
         'filename': 'foo.py',
         'module': 'foo'
     }])
     result = interface.get_hash()
     self.assertEquals(result, ['foo', 1])
开发者ID:Crowdbooster,项目名称:sentry,代码行数:10,代码来源:tests.py

示例5: test_get_hash_sanitizes_block_functions

# 需要导入模块: from sentry.interfaces import Stacktrace [as 别名]
# 或者: from sentry.interfaces.Stacktrace import get_hash [as 别名]
 def test_get_hash_sanitizes_block_functions(self):
     # This is Ruby specific
     interface = Stacktrace(frames=[{
         'filename': 'foo.py',
         'function': 'block in _conditional_callback_around_233',
     }])
     result = interface.get_hash()
     self.assertEquals(result, ['foo.py', 'block'])
开发者ID:crockpotveggies,项目名称:BurntVeggies,代码行数:10,代码来源:tests.py

示例6: test_get_hash_sanitizes_erb_templates

# 需要导入模块: from sentry.interfaces import Stacktrace [as 别名]
# 或者: from sentry.interfaces.Stacktrace import get_hash [as 别名]
 def test_get_hash_sanitizes_erb_templates(self):
     # This is Ruby specific
     interface = Stacktrace(frames=[{
         'filename': 'foo.html.erb',
         'function': '_foo_html_erb__3327151541118998292_70361296749460',
     }])
     result = interface.get_hash()
     self.assertEquals(result, [
         'foo.html.erb', '_foo_html_erb__<anon>_<anon>',
     ])
开发者ID:crockpotveggies,项目名称:BurntVeggies,代码行数:12,代码来源:tests.py

示例7: test_get_hash_sanitizes_versioned_filenames

# 需要导入模块: from sentry.interfaces import Stacktrace [as 别名]
# 或者: from sentry.interfaces.Stacktrace import get_hash [as 别名]
    def test_get_hash_sanitizes_versioned_filenames(self):
        # This is Ruby specific
        interface = Stacktrace(frames=[{
            'filename': '/data/foo/releases/20140114151955/app/views/foo.html.erb',
            'context_line': '<% if @hotels.size > 0 %>',
        }])
        result = interface.get_hash()
        self.assertEquals(result, [
            '/data/foo/releases/<version>/app/views/foo.html.erb',
            '<% if @hotels.size > 0 %>',
        ])

        interface = Stacktrace(frames=[{
            'filename': '20140114151955/app/views/foo.html.erb',
            'context_line': '<% if @hotels.size > 0 %>',
        }])
        result = interface.get_hash()
        self.assertEquals(result, [
            '<version>/app/views/foo.html.erb',
            '<% if @hotels.size > 0 %>',
        ])
开发者ID:crockpotveggies,项目名称:BurntVeggies,代码行数:23,代码来源:tests.py

示例8: test_get_hash_uses_context_line_over_function

# 需要导入模块: from sentry.interfaces import Stacktrace [as 别名]
# 或者: from sentry.interfaces.Stacktrace import get_hash [as 别名]
 def test_get_hash_uses_context_line_over_function(self):
     interface = Stacktrace(
         frames=[{"context_line": "foo bar", "lineno": 1, "filename": "foo.py", "function": "bar"}]
     )
     result = interface.get_hash()
     self.assertEquals(result, ["foo.py", "foo bar"])
开发者ID:kangman,项目名称:sentry,代码行数:8,代码来源:tests.py

示例9: test_get_hash_uses_module_over_filename

# 需要导入模块: from sentry.interfaces import Stacktrace [as 别名]
# 或者: from sentry.interfaces.Stacktrace import get_hash [as 别名]
 def test_get_hash_uses_module_over_filename(self):
     interface = Stacktrace(frames=[{"lineno": 1, "filename": "foo.py", "module": "foo"}])
     result = interface.get_hash()
     self.assertEquals(result, ["foo", 1])
开发者ID:kangman,项目名称:sentry,代码行数:6,代码来源:tests.py

示例10: test_get_hash_ignores_filename_if_abs_path_is_http

# 需要导入模块: from sentry.interfaces import Stacktrace [as 别名]
# 或者: from sentry.interfaces.Stacktrace import get_hash [as 别名]
 def test_get_hash_ignores_filename_if_abs_path_is_http(self):
     interface = Stacktrace(
         frames=[{"context_line": "hello world", "abs_path": "https://foo.com/foo.py", "filename": "foo.py"}]
     )
     result = interface.get_hash()
     self.assertEquals(result, ["hello world"])
开发者ID:kangman,项目名称:sentry,代码行数:8,代码来源:tests.py

示例11: test_get_hash_with_only_required_vars

# 需要导入模块: from sentry.interfaces import Stacktrace [as 别名]
# 或者: from sentry.interfaces.Stacktrace import get_hash [as 别名]
 def test_get_hash_with_only_required_vars(self):
     interface = Stacktrace(frames=[{"lineno": 1, "filename": "foo.py"}])
     result = interface.get_hash()
     self.assertEquals(result, ["foo.py", 1])
开发者ID:kangman,项目名称:sentry,代码行数:6,代码来源:tests.py


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