summaryrefslogtreecommitdiff
path: root/testsuite.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2017-11-02 20:44:10 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2017-11-02 20:44:10 +0100
commit1b9c437b95a986ec7279afe638fa8a6770beb168 (patch)
tree4b15d5b7e9ad866966e247e5bc1334c772e935ca /testsuite.py
parent852eae7d41abed9051f72d0ba72bfb854cfb6fcb (diff)
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.
Diffstat (limited to 'testsuite.py')
-rw-r--r--testsuite.py29
1 files changed, 0 insertions, 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"}