示例#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)
示例#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)
示例#3
0
文件: ui.py 项目: fchauvel/MAD
 def _validate(self, expression):
     validator = Validator()
     validator.validate(expression)
     if validator.raised_warnings():
         for each_warning in validator.errors:
             each_warning.accept(self.display)
示例#4
0
文件: ui.py 项目: fchauvel/MAD
 def _validate(self, expression):
     validator = Validator()
     validator.validate(expression)
     if validator.raised_warnings():
         for each_warning in validator.errors:
             each_warning.accept(self.display)