changeset 2680:6e9a4e333f76

Skip xmpp bot test if pyxmpp is not installed.
author Karol Nowak <grzywacz@sul.uni.lodz.pl>
date Wed, 15 Aug 2007 20:54:19 +0200
parents 93070ec4ff59
children 56da6876eb07
files jabberbot/_tests/test_xmppbot.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jabberbot/_tests/test_xmppbot.py	Wed Aug 15 01:16:48 2007 +0200
+++ b/jabberbot/_tests/test_xmppbot.py	Wed Aug 15 20:54:19 2007 +0200
@@ -6,10 +6,16 @@
     @license: GNU GPL, see COPYING for details.
 """
 
+import py.test
 from Queue import Queue
 
+try:
+    import pyxmpp
+except ImportError:
+    py.test.skip("Skipping jabber bot tests - pyxmpp is not installed")
+
+from jabberbot.xmppbot import XMPPBot
 import jabberbot.commands as commands
-from jabberbot.xmppbot import XMPPBot
 from jabberbot.config import BotConfig
 
 class TestXMPPBotCommands: