From 06b8eb58e5269e279cb51c14477e2a5c34749368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Apitzsch?= Date: Wed, 17 Jan 2018 22:36:14 +0100 Subject: [PATCH] Fix tests --- gajim/common/caps_cache.py | 3 ++- setup.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gajim/common/caps_cache.py b/gajim/common/caps_cache.py index b0975067c..5aa85bba8 100644 --- a/gajim/common/caps_cache.py +++ b/gajim/common/caps_cache.py @@ -46,7 +46,7 @@ from nbxmpp import (NS_XHTML_IM, NS_ESESSION, NS_CHATSTATES, FEATURE_BLACKLIST = [NS_CHATSTATES, NS_XHTML_IM, NS_ESESSION, NS_JINGLE_ICE_UDP, NS_JINGLE_RTP_AUDIO, NS_JINGLE_RTP_VIDEO, NS_JINGLE_FILE_TRANSFER_5] -from gajim.common import app + # Query entry status codes NEW = 0 QUERIED = 1 @@ -457,6 +457,7 @@ class MucCapsCache: identities, features, data = [], [], [] query_childs = stanza.getQueryChildren() if not query_childs: + from gajim.common import app app.log('gajim.muc').warning('%s returned empty disco info', jid) return diff --git a/setup.py b/setup.py index 4925137fa..9d3964a60 100644 --- a/setup.py +++ b/setup.py @@ -14,6 +14,8 @@ from setuptools.command.build_py import build_py as _build from distutils import log from distutils.util import convert_path, newer +import subprocess + import gajim pos = [x for x in os.listdir('po') if x[-3:] == ".po"] @@ -179,14 +181,14 @@ class test(Command): pass def run(self): - os.system("./test/runtests.py") + exit(subprocess.call("./test/runtests.py")) class test_nogui(test): description = "Run tests without GUI" def run(self): - os.system("./test/runtests.py -n") + exit(subprocess.call(["./test/runtests.py", "-n"])) class update_po(Command):