a script for running all the tests
This commit is contained in:
parent
ab70491d56
commit
83d9ef49a3
|
@ -69,7 +69,7 @@ class MockInterface(Mock):
|
|||
|
||||
class MockLogger(Mock):
|
||||
def __init__(self):
|
||||
Mock.__init__(self, {'write': None})
|
||||
Mock.__init__(self, {'write': None, 'get_transports_type': {}})
|
||||
|
||||
class MockContact(Mock):
|
||||
def __nonzero__(self):
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import unittest
|
||||
|
||||
# new test modules need to be added manually
|
||||
modules = ( 'test_caps',
|
||||
'test_dispatcher_nb',
|
||||
'test_misc_interface',
|
||||
'test_roster',
|
||||
'test_sessions',
|
||||
)
|
||||
for mod in modules:
|
||||
suite = unittest.defaultTestLoader.loadTestsFromName(mod)
|
||||
unittest.TextTestRunner(verbosity=1).run(suite)
|
||||
|
||||
# vim: se ts=3:
|
|
@ -5,15 +5,10 @@ import testlib
|
|||
testlib.setup_env()
|
||||
|
||||
from common import gajim
|
||||
from common import xmpp
|
||||
|
||||
from common.caps import CapsCache
|
||||
|
||||
from mock import Mock
|
||||
|
||||
from gajim import Interface
|
||||
|
||||
gajim.logger = Mock()
|
||||
from mocks import MockLogger
|
||||
gajim.logger = MockLogger()
|
||||
|
||||
Interface()
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@ import os.path
|
|||
|
||||
gajim_root = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')
|
||||
|
||||
sys.path.append(gajim_root + '/src')
|
||||
# look for modules in the CWD, then gajim/src, then everywhere else
|
||||
sys.path.insert(1, gajim_root + '/src')
|
||||
|
||||
# a temporary version of ~/.gajim for testing
|
||||
configdir = gajim_root + '/test/tmp'
|
||||
|
|
Loading…
Reference in New Issue