summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4952650)
In order to support future selectivity of test sets, replace the
immutable tuple of all tests with a dict keyed by test object.
Iterate over a copy of it so that the original is not altered when
tests are eventually removed during runtime. For Python 3.5 and
earlier, use OrderedDict so that test order is explicitly preserved.
import telnetlib
import time
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 = (
pidfile = "var/mudpy.pid"
test_account0_setup = (
(2, r"Disconnecting\.\.\.", ""),
)
(2, r"Disconnecting\.\.\.", ""),
)
(test_account0_setup, "first account setup"),
(test_account1_setup, "second account setup"),
(test_actor_appears, "actor spontaneous appearance"),
(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"),
(test_invalid_loglevel, "invalid loglevel"),
(test_log_no_errors, "no errors logged"),
(final_cleanup, "delete remaining accounts"),
def start_service(config):
def start_service(config):
for luser in lusers:
luser.open("::1", 4000)
luser.set_option_negotiation_callback(option_callback)
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:
tlog("\nTesting %s..." % description)
test_start = time.time()
for conversant, question, answer in test: