def step_Morelia_evaluates_the_file(self): self.diagnostic = None try: language = self._get_language() p = Parser(language=language) self.file_contents.replace('\\#', '#') # note - this is how to unescape characters - DIY prefix = u'{}: Sample\n{}: Sample\n'.format(self.feature_keyword, self.scenario_keyword) p.parse_features(prefix + self.file_contents).evaluate(self) except (MissingStepError, AssertionError) as e: self.diagnostic = str(e)
def step_Morelia_evaluates_the_file(self): self.diagnostic = None try: language = self._get_language() p = Parser(language=language) self.file_contents.replace( '\\#', '#') # note - this is how to unescape characters - DIY prefix = u'{}: Sample\n{}: Sample\n'.format( self.feature_keyword, self.scenario_keyword) p.parse_features(prefix + self.file_contents).evaluate(self) except (MissingStepError, AssertionError) as e: self.diagnostic = str(e)
def step_Morelia_evaluates_the_file(self): self.diagnostic = None try: p = Parser() self.file_contents.replace( "\\#", "#") # note - this is how to unescape characters - DIY prefix = "Feature: Sample\nScenario: Sample\n" feature = p.parse_features(prefix + self.file_contents) execute_script(feature, self) except (MissingStepError, AssertionError) as e: self.diagnostic = str(e)
def step_Morelia_evaluates_the_file(self): self.diagnostic = None try: p = Parser() self.file_contents.replace( "\\#", "#" ) # note - this is how to unescape characters - DIY prefix = "Feature: Sample\nScenario: Sample\n" feature = p.parse_features(prefix + self.file_contents) execute_script(feature, self) except (MissingStepError, AssertionError) as e: self.diagnostic = str(e)
def assemble_scene_table(self, moar=''): scene = self.assemble_scene_table_source(moar) language = self._get_language() p = Parser(language=language) self.table_scene = p.parse_features(scene)