From 198a0ca738d18980901b674fd89849fa5eba79f6 Mon Sep 17 00:00:00 2001 From: Brendan Taylor <bct@diffeq.com> Date: Sat, 9 Aug 2008 00:24:08 +0000 Subject: [PATCH] moved testing libraries into their own directory --- test/{testlib.py => lib/__init__.py} | 5 +++-- test/{ => lib}/data.py | 0 test/{ => lib}/mock.py | 0 test/{ => lib}/mocks.py | 0 test/{ => lib}/notify.py | 0 test/test_caps.py | 6 +++--- test/test_dispatcher_nb.py | 6 +++--- test/test_misc_interface.py | 4 ++-- test/test_roster.py | 4 ++-- test/test_sessions.py | 4 ++-- 10 files changed, 15 insertions(+), 14 deletions(-) rename test/{testlib.py => lib/__init__.py} (84%) rename test/{ => lib}/data.py (100%) rename test/{ => lib}/mock.py (100%) rename test/{ => lib}/mocks.py (100%) rename test/{ => lib}/notify.py (100%) diff --git a/test/testlib.py b/test/lib/__init__.py similarity index 84% rename from test/testlib.py rename to test/lib/__init__.py index 3682ba86a0..3a1300e12f 100644 --- a/test/testlib.py +++ b/test/lib/__init__.py @@ -1,10 +1,11 @@ import sys import os.path -gajim_root = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..') +gajim_root = os.path.join(os.path.abspath(os.path.dirname(__file__)), '../..') -# look for modules in the CWD, then gajim/src, then everywhere else +# look for modules in the CWD, then gajim/test/lib, then gajim/src, then everywhere else sys.path.insert(1, gajim_root + '/src') +sys.path.insert(1, gajim_root + '/test/lib') # a temporary version of ~/.gajim for testing configdir = gajim_root + '/test/tmp' diff --git a/test/data.py b/test/lib/data.py similarity index 100% rename from test/data.py rename to test/lib/data.py diff --git a/test/mock.py b/test/lib/mock.py similarity index 100% rename from test/mock.py rename to test/lib/mock.py diff --git a/test/mocks.py b/test/lib/mocks.py similarity index 100% rename from test/mocks.py rename to test/lib/mocks.py diff --git a/test/notify.py b/test/lib/notify.py similarity index 100% rename from test/notify.py rename to test/lib/notify.py diff --git a/test/test_caps.py b/test/test_caps.py index 642da1cb8e..3a2bddeba3 100644 --- a/test/test_caps.py +++ b/test/test_caps.py @@ -1,8 +1,8 @@ # tests for capabilities and the capabilities cache import unittest -import testlib -testlib.setup_env() +import lib +lib.setup_env() from common import gajim from common import xmpp @@ -46,4 +46,4 @@ def test_examples(self): if __name__ == '__main__': unittest.main() -# vim: se ts=3: \ No newline at end of file +# vim: se ts=3: diff --git a/test/test_dispatcher_nb.py b/test/test_dispatcher_nb.py index 552380242e..1bf9cb2c69 100644 --- a/test/test_dispatcher_nb.py +++ b/test/test_dispatcher_nb.py @@ -1,8 +1,8 @@ # tests for xmpppy's dispatcher_nb.py import unittest -import testlib -testlib.setup_env() +import lib +lib.setup_env() from mock import Mock @@ -52,4 +52,4 @@ def _got_message(conn, msg): if __name__ == '__main__': unittest.main() -# vim: se ts=3: \ No newline at end of file +# vim: se ts=3: diff --git a/test/test_misc_interface.py b/test/test_misc_interface.py index 5225e6ea04..709632bdbd 100644 --- a/test/test_misc_interface.py +++ b/test/test_misc_interface.py @@ -1,8 +1,8 @@ # tests for the miscellaneous functions scattered throughout src/gajim.py import unittest -import testlib -testlib.setup_env() +import lib +lib.setup_env() from common import gajim from gajim import Interface diff --git a/test/test_roster.py b/test/test_roster.py index 6da8715f92..21a48a6379 100755 --- a/test/test_roster.py +++ b/test/test_roster.py @@ -2,8 +2,8 @@ import time -import testlib -testlib.setup_env() +import lib +lib.setup_env() from data import * diff --git a/test/test_sessions.py b/test/test_sessions.py index 1669157d62..1699feee74 100644 --- a/test/test_sessions.py +++ b/test/test_sessions.py @@ -2,8 +2,8 @@ import time -import testlib -testlib.setup_env() +import lib +lib.setup_env() from common import gajim from common import xmpp -- GitLab