From 2945cfe96f7722f5072be7c1e408e75ce0b60e3e Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Wed, 10 Aug 2022 15:01:06 +0200 Subject: PAL: suite visitor Change-Id: Icab58df411935bad46b5e4ca84288d1631cfe2e8 Signed-off-by: Tibor Frank --- resources/tools/presentation/input_data_parser.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'resources') diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py index 67aec2f8b1..556eab1ebf 100644 --- a/resources/tools/presentation/input_data_parser.py +++ b/resources/tools/presentation/input_data_parser.py @@ -1043,6 +1043,8 @@ class ExecutionChecker(ResultVisitor): } suite.setup.visit(self) + suite.body.visit(self) + suite.teardown.visit(self) def end_suite(self, suite): """Called when suite ends. @@ -1060,7 +1062,9 @@ class ExecutionChecker(ResultVisitor): :returns: Nothing. """ if self.start_test(test) is not False: + test.setup.visit(self) test.body.visit(self) + test.teardown.visit(self) self.end_test(test) def start_test(self, test): @@ -1254,9 +1258,9 @@ class ExecutionChecker(ResultVisitor): :returns: Nothing. """ try: - if keyword.type == u"setup": + if keyword.type in ("setup", "SETUP"): self.visit_setup_kw(keyword) - elif keyword.type == u"teardown": + elif keyword.type in ("teardown", "TEARDOWN"): self.visit_teardown_kw(keyword) else: self.visit_test_kw(keyword) @@ -1325,6 +1329,10 @@ class ExecutionChecker(ResultVisitor): if self.start_setup_kw(keyword) is not False: self.visit_setup_kw(keyword) self.end_setup_kw(keyword) + for keyword in setup_kw.body: + if self.start_setup_kw(keyword) is not False: + self.visit_setup_kw(keyword) + self.end_setup_kw(keyword) def start_setup_kw(self, setup_kw): """Called when teardown keyword starts. Default implementation does -- cgit 1.2.3-korg