From: Jeremy Stanley Date: Fri, 13 Jul 2018 17:04:24 +0000 (+0000) Subject: Clean up at the end of every selftest run X-Git-Tag: 0.0.1~69 X-Git-Url: https://mudpy.org/gitweb?a=commitdiff_plain;h=dd0dd65ee60e71ab5f32b6bb63a28a8b157949a3;p=mudpy.git Clean up at the end of every selftest run As the last sequence of calls made in the selftest suite, delete remaining created accounts. This makes it possible to rerun the selftest with data files preserved from a previous run to confirm we don't introduce any dependencies on a fresh environment. --- diff --git a/mudpy/tests/selftest.py b/mudpy/tests/selftest.py index f262063..fa96ad0 100644 --- a/mudpy/tests/selftest.py +++ b/mudpy/tests/selftest.py @@ -261,6 +261,21 @@ test_log_no_errors = ( (2, r"None of the [0-9]+ lines in memory matches your request\.", ""), ) +final_cleanup = ( + (0, "> ", "quit"), + (0, "What would you like to do?", "d"), + (0, "Whom would you like to delete?", ""), + (0, "What would you like to do?", "p"), + (0, "permanently delete your account?", "y"), + (0, "Disconnecting...", ""), + (2, "> ", "quit"), + (2, "What would you like to do?", "d"), + (2, "Whom would you like to delete?", ""), + (2, "What would you like to do?", "p"), + (2, "permanently delete your account?", "y"), + (2, "Disconnecting...", ""), +) + dialogue = ( (test_account0_setup, "first account setup"), (test_account1_setup, "second account setup"), @@ -293,6 +308,7 @@ dialogue = ( (test_custom_loglevel, "custom loglevel"), (test_invalid_loglevel, "invalid loglevel"), (test_log_no_errors, "no errors logged"), + (final_cleanup, "delete remaining accounts"), )