Beispiel #1
0
    def _do_test(self, expression, expected_errors):
        try:
            validation = Validator()
            validation.validate(expression)
            if not validation.raised_warnings():
                self.fail("Expecting issue detected for expression %s" % str(expression))
            else:
                self._verify_issues(expression, validation.errors, expected_errors)

        except InvalidModel:
            self._verify_issues(expression, validation.errors, expected_errors)
Beispiel #2
0
    def _do_test(self, expression, expected_errors):
        try:
            validation = Validator()
            validation.validate(expression)
            if not validation.raised_warnings():
                self.fail("Expecting issue detected for expression %s" %
                          str(expression))
            else:
                self._verify_issues(expression, validation.errors,
                                    expected_errors)

        except InvalidModel:
            self._verify_issues(expression, validation.errors, expected_errors)
Beispiel #3
0
 def _validate(self, expression):
     validator = Validator()
     validator.validate(expression)
     if validator.raised_warnings():
         for each_warning in validator.errors:
             each_warning.accept(self.display)
Beispiel #4
0
 def _validate(self, expression):
     validator = Validator()
     validator.validate(expression)
     if validator.raised_warnings():
         for each_warning in validator.errors:
             each_warning.accept(self.display)