本文整理汇总了Python中validator.errorbundler.ErrorBundle.metadata方法的典型用法代码示例。如果您正苦于以下问题:Python ErrorBundle.metadata方法的具体用法?Python ErrorBundle.metadata怎么用?Python ErrorBundle.metadata使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类validator.errorbundler.ErrorBundle
的用法示例。
在下文中一共展示了ErrorBundle.metadata方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _do_real_test_raw
# 需要导入模块: from validator.errorbundler import ErrorBundle [as 别名]
# 或者: from validator.errorbundler.ErrorBundle import metadata [as 别名]
def _do_real_test_raw(script, path="foo.js", versions=None, detected_type=None,
metadata=None, resources=None):
"""Perform a JS test using a non-mock bundler."""
err = ErrorBundle()
if detected_type:
err.detected_type = detected_type
err.supported_versions = versions or {}
if metadata is not None:
err.metadata = metadata
if resources is not None:
err.resources = resources
validator.testcases.content._process_file(err, MockXPI(), path, script)
return err
示例2: _do_real_test_raw
# 需要导入模块: from validator.errorbundler import ErrorBundle [as 别名]
# 或者: from validator.errorbundler.ErrorBundle import metadata [as 别名]
def _do_real_test_raw(script, path='foo.js', versions=None, detected_type=None,
metadata=None, resources=None, jetpack=False):
"""Perform a JS test using a non-mock bundler."""
err = ErrorBundle(for_appversions=versions or {})
if detected_type:
err.detected_type = detected_type
if metadata is not None:
err.metadata = metadata
if resources is not None:
err.resources = resources
if jetpack:
err.metadata['is_jetpack'] = True
validator.testcases.content._process_file(err, MockXPI(), path, script,
path.lower())
return err