public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Petteri Räty" <betelgeuse@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/council-webapp:master commit in: bot/tests/
Date: Thu, 28 Jul 2011 19:42:35 +0000 (UTC)	[thread overview]
Message-ID: <98c8db34bdd0c7287ba4ffaf3f7d3f720cc01cec.betelgeuse@gentoo> (raw)

commit:     98c8db34bdd0c7287ba4ffaf3f7d3f720cc01cec
Author:     Joachim Filip Ignacy Bartosik <jbartosik <AT> gmail <DOT> com>
AuthorDate: Mon Jul 25 13:20:27 2011 +0000
Commit:     Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
CommitDate: Mon Jul 25 13:21:38 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/council-webapp.git;a=commit;h=98c8db34

Fix failing supybot test

---
 bot/tests/run_test.py |   13 +++++++++----
 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 = """



             reply	other threads:[~2011-07-28 20:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28 19:42 Petteri Räty [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-07-13 16:01 [gentoo-commits] proj/council-webapp:master commit in: bot/tests/ Petteri Räty
2011-06-18 15:46 Petteri Räty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=98c8db34bdd0c7287ba4ffaf3f7d3f720cc01cec.betelgeuse@gentoo \
    --to=betelgeuse@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox