Rev 9: Put tests in a subdir. in http://people.ubuntu.com/~robertc/baz2.0/plugins/gnomeserver/trunk
Robert Collins
robertc at robertcollins.net
Tue Jul 8 16:27:40 BST 2008
At http://people.ubuntu.com/~robertc/baz2.0/plugins/gnomeserver/trunk
------------------------------------------------------------
revno: 9
revision-id: robertc at robertcollins.net-20080708152739-6t7bqg7pc6tjb1rd
parent: james at jamesh.id.au-20080703034511-whmub7prh10mts4s
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Wed 2008-07-09 01:27:39 +1000
message:
Put tests in a subdir.
added:
tests/ tests-20080708151820-gvn5ffye5h6tbukc-1
tests/__init__.py __init__.py-20080708152414-ty0mkc6dh85wfoic-1
renamed:
test_fetch_repos.py => tests/test_fetch_repos.py test_fetch_repos.py-20080623105609-2oleip9iw5525lk8-1
modified:
__init__.py __init__.py-20080623085530-l7416iuvvj8es217-1
=== modified file '__init__.py'
--- a/__init__.py 2008-07-03 03:45:11 +0000
+++ b/__init__.py 2008-07-08 15:27:39 +0000
@@ -2,6 +2,7 @@
from bzrlib.commands import Command, register_command
from bzrlib.lazy_import import lazy_import
+from bzrlib.bzrdir import BzrDir
lazy_import(globals(), """
import os
import pwd
@@ -9,10 +10,8 @@
import subprocess
from bzrlib import errors
-from bzrlib.bzrdir import BzrDir
from bzrlib.plugins.gnomeserver.fetch_repos import (
fetch_trunk_revision, update_repos)
-from bzrlib.tests.TestUtil import TestLoader
from bzrlib.transport import get_transport
""")
@@ -28,12 +27,6 @@
USER_BRANCH_DIR = '/bzr'
-def test_suite():
- return TestLoader().loadTestsFromModuleNames([
- 'bzrlib.plugins.gnomeserver.test_fetch_repos'
- ])
-
-
class cmd_fetch_repo_trunks(Command):
"""Fetch trunk branches from one set of repositories to another."""
takes_options = []
@@ -113,3 +106,16 @@
register_command(cmd_make_module_repo)
+
+
+def test_suite():
+ # Thunk across to load_tests for niceness with older bzr versions
+ from bzrlib.tests import TestLoader
+ loader = TestLoader()
+ return loader.loadTestsFromModuleNames(['bzrlib.plugins.gnomeserver'])
+
+
+def load_tests(standard_tests, module, loader):
+ standard_tests.addTests(loader.loadTestsFromModuleNames(
+ ['bzrlib.plugins.gnomeserver.tests']))
+ return standard_tests
=== added directory 'tests'
=== added file 'tests/__init__.py'
--- a/tests/__init__.py 1970-01-01 00:00:00 +0000
+++ b/tests/__init__.py 2008-07-08 15:27:39 +0000
@@ -0,0 +1,14 @@
+# bzr-gnomeserver, plugin providing server logic for gnome/bzr.
+
+
+"""Tests for the gnomeserver bzr plugin."""
+
+
+def load_tests(standard_tests, module, loader):
+ test_modules = [
+ 'fetch_repos',
+ ]
+ standard_tests.addTests(loader.loadTestsFromModuleNames(
+ ['bzrlib.plugins.gnomeserver.tests.test_' + name for
+ name in test_modules]))
+ return standard_tests
=== renamed file 'test_fetch_repos.py' => 'tests/test_fetch_repos.py'
More information about the bazaar-commits
mailing list