aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2011-07-25 15:20:27 +0200
committerJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2011-07-25 15:21:38 +0200
commit98c8db34bdd0c7287ba4ffaf3f7d3f720cc01cec (patch)
tree0ffec8018398a4643ccd11119cd0fb23b1d2db67
parentImprove tests coverage (diff)
downloadcouncil-webapp-98c8db34bdd0c7287ba4ffaf3f7d3f720cc01cec.tar.gz
council-webapp-98c8db34bdd0c7287ba4ffaf3f7d3f720cc01cec.tar.bz2
council-webapp-98c8db34bdd0c7287ba4ffaf3f7d3f720cc01cec.zip
Fix failing supybot test
-rw-r--r--bot/tests/run_test.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/bot/tests/run_test.py b/bot/tests/run_test.py
index 136e135..3f84ccb 100644
--- a/bot/tests/run_test.py
+++ b/bot/tests/run_test.py
@@ -54,16 +54,21 @@ class MeetBotTest(unittest.TestCase):
doesn't have a useful status code, so I need to parse the
output.
"""
- os.symlink("../MeetBot", "MeetBot")
- os.symlink("../ircmeeting", "ircmeeting")
+
+ links_to_remove = []
+ for file in ["MeetBot", "ircmeeting"]:
+ if not os.path.exists(file):
+ os.symlink("../" + file , file)
+ links_to_remove.append(file)
+
sys.path.insert(0, ".")
try:
output = os.popen("supybot-test ./MeetBot 2>&1").read()
assert 'FAILED' not in output, "supybot-based tests failed."
assert '\nOK\n' in output, "supybot-based tests failed."
finally:
- os.unlink("MeetBot")
- os.unlink("ircmeeting")
+ for link in links_to_remove:
+ os.unlink(link)
del sys.path[0]
trivial_contents = """