Beispiel #1
0
 def _checkRequiredOptions(self):
     missing_options = []
     for required_option in self.requiredOptions:
         log.debug("Checking if %s is present" % required_option)
         if required_option not in self.localOptions or \
                 self.localOptions[required_option] is None:
             missing_options.append(required_option)
     if missing_options:
         raise e.MissingRequiredOption(missing_options, self)
Beispiel #2
0
 def _checkRequiredOptions(self, test_class):
     missing_options = []
     for required_option in test_class.requiredOptions:
         log.debug("Checking if %s is present" % required_option)
         if required_option not in self.localOptions or \
                 self.localOptions[required_option] is None:
             missing_options.append(required_option)
     missing_test_helpers = [opt in test_class.requiredTestHelpers.keys()
                             for opt in missing_options]
     if len(missing_test_helpers) and all(missing_test_helpers):
         self.missingTestHelpers = map(lambda x:
                                         (x, test_class.requiredTestHelpers[x]),
                                       missing_options)
         raise e.MissingTestHelper(missing_options, test_class)
     elif missing_options:
         raise e.MissingRequiredOption(missing_options, test_class)