本文整理汇总了Python中appvalidator.errorbundle.ErrorBundle.supported_versions方法的典型用法代码示例。如果您正苦于以下问题:Python ErrorBundle.supported_versions方法的具体用法?Python ErrorBundle.supported_versions怎么用?Python ErrorBundle.supported_versions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类appvalidator.errorbundle.ErrorBundle
的用法示例。
在下文中一共展示了ErrorBundle.supported_versions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ErrorBundle
# 需要导入模块: from appvalidator.errorbundle import ErrorBundle [as 别名]
# 或者: from appvalidator.errorbundle.ErrorBundle import supported_versions [as 别名]
import os
from appvalidator.constants import SPIDERMONKEY_INSTALLATION
from appvalidator.errorbundle import ErrorBundle
from appvalidator.errorbundle.outputhandlers.shellcolors import OutputHandler
import appvalidator.testcases.scripting as scripting
import appvalidator.testcases.javascript.traverser
from appvalidator.testcases.javascript.predefinedentities import GLOBAL_ENTITIES
import appvalidator.testcases.javascript.spidermonkey as spidermonkey
appvalidator.testcases.javascript.traverser.DEBUG = True
if __name__ == "__main__":
err = ErrorBundle(instant=True)
err.handler = OutputHandler(sys.stdout, False)
err.supported_versions = {}
if len(sys.argv) > 1:
path = sys.argv[1]
script = open(path).read()
scripting.test_js_file(err=err, filename=path, data=script)
else:
trav = appvalidator.testcases.javascript.traverser.Traverser(err, "stdin")
trav._push_context()
def do_inspect(wrapper, arguments, traverser):
print "~" * 50
for arg in arguments:
if arg["type"] == "Identifier":
print 'Identifier: "%s"' % arg["name"]
else:
print arg["type"]