diff options
author | Tibor Frank <tifrank@cisco.com> | 2022-08-10 15:01:06 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2022-08-10 15:01:06 +0200 |
commit | 2945cfe96f7722f5072be7c1e408e75ce0b60e3e (patch) | |
tree | 930f5827a1101fcc02ee19decb651b093167a265 | |
parent | 7ece7949b9097e44ae4ce12e4dd8b95da5dfbc49 (diff) |
PAL: suite visitor
Change-Id: Icab58df411935bad46b5e4ca84288d1631cfe2e8
Signed-off-by: Tibor Frank <tifrank@cisco.com>
-rw-r--r-- | resources/tools/presentation/input_data_parser.py | 12 |
1 files changed, 10 insertions, 2 deletions
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 |