Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def add_property(self, name, value):
"""Adds a property to the testsuite.
See :class:`Property` and :class:`Properties`
"""
props = self.child(Properties)
if props is None:
props = Properties()
self.append(props)
prop = Property(name, value)
props.add_property(prop)
def remove_property(self, property_):
"""Removes a property."""
props = self.child(Properties)
if props is None:
return
for prop in props:
if prop == property_:
props.remove(property_)
def add_property(self, name, value):
"""Adds a property to the testsuite/testcase.
See :class:`Property` and :class:`Properties`
"""
props = self.child(Properties)
if props is None:
props = Properties()
self.append(props)
prop = Property(name, value)
props.add_property(prop)
def properties(self):
"""Iterates through all properties."""
props = self.child(Properties)
if props is None:
return
for prop in props:
yield prop
def __init__(self):
super(Properties, self).__init__(self._tag)