本文整理汇总了Python中wptmanifest.backends.conditional.ManifestItem.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python ManifestItem.__init__方法的具体用法?Python ManifestItem.__init__怎么用?Python ManifestItem.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wptmanifest.backends.conditional.ManifestItem
的用法示例。
在下文中一共展示了ManifestItem.__init__方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from wptmanifest.backends.conditional import ManifestItem [as 别名]
# 或者: from wptmanifest.backends.conditional.ManifestItem import __init__ [as 别名]
def __init__(self, node, test_path=None, url_base=None, property_order=None,
boolean_properties=None):
"""Object representing all the tests in a particular manifest
:param node: AST Node associated with this object. If this is None,
a new AST is created to associate with this manifest.
:param test_path: Path of the test file associated with this manifest.
:param url_base: Base url for serving the tests in this manifest.
:param property_order: List of properties to use in expectation metadata
from most to least significant.
:param boolean_properties: Set of properties in property_order that should
be treated as boolean.
"""
if node is None:
node = DataNode(None)
ManifestItem.__init__(self, node)
self.child_map = {}
self.test_path = test_path
self.url_base = url_base
assert self.url_base is not None
self.modified = False
self.boolean_properties = boolean_properties
self.property_order = property_order
self.update_properties = {
"lsan": LsanUpdate(self),
"leak-object": LeakObjectUpdate(self),
"leak-threshold": LeakThresholdUpdate(self),
}
示例2: __init__
# 需要导入模块: from wptmanifest.backends.conditional import ManifestItem [as 别名]
# 或者: from wptmanifest.backends.conditional.ManifestItem import __init__ [as 别名]
def __init__(self, node):
"""Node in a tree structure representing the paths
that should be included or excluded from the test run.
:param node: AST Node corresponding to this Node.
"""
ManifestItem.__init__(self, node)
self.child_map = {}
示例3: __init__
# 需要导入模块: from wptmanifest.backends.conditional import ManifestItem [as 别名]
# 或者: from wptmanifest.backends.conditional.ManifestItem import __init__ [as 别名]
def __init__(self, node):
"""Tree node associated with a particular test in a manifest
:param node: AST node associated with the test"""
ManifestItem.__init__(self, node)
self.updated_expected = []
self.new_expected = []
self.subtests = {}
self.default_status = None
self._from_file = True
示例4: __init__
# 需要导入模块: from wptmanifest.backends.conditional import ManifestItem [as 别名]
# 或者: from wptmanifest.backends.conditional.ManifestItem import __init__ [as 别名]
def __init__(self, node):
"""Tree node associated with a particular test in a manifest
:param node: AST node associated with the test"""
ManifestItem.__init__(self, node)
self.subtests = {}
self._from_file = True
self.update_properties = {
"expected": ExpectedUpdate(self),
"max-asserts": MaxAssertsUpdate(self),
"min-asserts": MinAssertsUpdate(self)
}
示例5: __init__
# 需要导入模块: from wptmanifest.backends.conditional import ManifestItem [as 别名]
# 或者: from wptmanifest.backends.conditional.ManifestItem import __init__ [as 别名]
def __init__(self, node, test_path=None):
"""Object representing all the tests in a particular manifest
:param node: AST Node associated with this object. If this is None,
a new AST is created to associate with this manifest.
:param test_path: Path of the test file associated with this manifest.
"""
if node is None:
node = DataNode(None)
ManifestItem.__init__(self, node)
self.child_map = {}
self.test_path = test_path
self.modified = False