import telnetlib
import time
+# TODO(fungi) Clean this up once Python 3.5 is no longer supported
+if sys.version < "3.6":
+ import collections
+ odict = collections.OrderedDict
+else:
+ odict = dict
+
pidfile = "var/mudpy.pid"
test_account0_setup = (
(2, r"Disconnecting\.\.\.", ""),
)
-dialogue = (
+dialogue = odict((
(test_account0_setup, "first account setup"),
(test_account1_setup, "second account setup"),
(test_actor_appears, "actor spontaneous appearance"),
(test_invalid_loglevel, "invalid loglevel"),
(test_log_no_errors, "no errors logged"),
(final_cleanup, "delete remaining accounts"),
-)
+))
def start_service(config):
for luser in lusers:
luser.open("::1", 4000)
luser.set_option_negotiation_callback(option_callback)
- for test, description in dialogue:
+ selected_dialogue = odict(dialogue)
+ for test, description in selected_dialogue.items():
tlog("\nTesting %s..." % description)
test_start = time.time()
for conversant, question, answer in test: