def expand_macro(self, formatter, name, text, args): """Execute the macro """ self.env.log.debug("TestPlanMacro.expand_macro()") parser = TestcaseParser(self.env) self.env.log.debug( "name: %s", str(name)) self.env.log.debug( "args: %s", str(args)) self.env.log.debug( "text: %s", str(text)) errors = list() # Parse config and testcases attrs, tcnames_and_users = TestPlanMacroParser(self.env).parse_config(text) self.log.debug("attrs: %s" % attrs) # syntax check the testcases for tcname, users in tcnames_and_users: try: parser.parseTestcase(tcname) except TracError, e: # FIXME: commented because auf genshi unicode error - raised # instead, see other FIXME below! #""" error_message = safe_unicode("Parsing error in Testcase %s:" % tcname) errors.append(system_message(error_message, text= safe_unicode(e.message)))
def expand_macro(self, formatter, name, text, args): """Execute the macro """ parser = TestcaseParser(self.env) out = StringIO.StringIO() f = Formatter(self.env, formatter.context) try: parser.parseTestcase(text=text) except Exception, e: out.write(system_message("Parsing error", text=e))