From 1b9c437b95a986ec7279afe638fa8a6770beb168 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Thu, 2 Nov 2017 20:44:10 +0100 Subject: Get rid of some old API compatibility hacks Scaffolding to make the test suite work with the new API. No longer needed. get_choices() will be gone soon too. --- testsuite.py | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/testsuite.py b/testsuite.py index 3afa66a..87914e7 100644 --- a/testsuite.py +++ b/testsuite.py @@ -115,28 +115,6 @@ def get_items(config, type_): rec(config.top_node) return items -def get_comments(config): - items = [] - def rec(node): - if node is not None: - if node.item == COMMENT: - items.append(node) - rec(node.list) - rec(node.next) - rec(config.top_node) - return items - -def get_menus(config): - items = [] - def rec(node): - if node is not None: - if node.item == MENU: - items.append(node) - rec(node.list) - rec(node.next) - rec(config.top_node) - return items - def get_choices(config): choices = get_items(config, Choice) unique_choices = [] @@ -145,13 +123,6 @@ def get_choices(config): unique_choices.append(choice) return unique_choices -def get_prompts(item): - prompts = [] - for node in item.nodes: - if node.prompt is not None: - prompts.append(node.prompt[0]) - return prompts - STR_TO_TRI = {"n": 0, "m": 1, "y": 2} TRI_TO_STR = {0: "n", 1: "m", 2: "y"} -- cgit v1.2.3