except AssertionError: raise Exception, 'Key "%s" already exists in sinks'%key
#store the port
self.get_sinks().append(sink)
- #begin the testing
- self.test()
-
- def test(self):
- """
- Call test on all children.
- """
- map(lambda c: c.test(), self.get_params() + self.get_sinks() + self.get_sources())
def get_enabled(self):
"""
def __init__(self, parent=None):
self._parent = parent
- def test(self):
- """
- Test the element against failures.
- Overload this method in sub-classes.
- """
- pass
-
##################################################
# Element Validation API
##################################################
try: assert self.get_value() in self.get_option_keys()
except AssertionError: raise Exception, 'The value "%s" is not in the possible values of "%s".'%(self.get_value(), self.get_option_keys())
else: self._value = value or ''
- #begin the testing
- self.test()
-
- def test(self):
- """
- call test on all children
- """
- map(lambda c: c.test(), self.get_options())
def validate(self):
"""