Rev 5409: (jameinel) Restore TestSuite and TestLoader as attributes of bzrlib.tests in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Fri Sep 3 03:53:13 BST 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5409 [merge]
revision-id: pqm at pqm.ubuntu.com-20100903025310-t8mj1bjq4fsyxk7p
parent: pqm at pqm.ubuntu.com-20100903013246-mydkx60um8b2trfq
parent: john at arbash-meinel.com-20100902201703-idn4su89d1388srn
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2010-09-03 03:53:10 +0100
message:
(jameinel) Restore TestSuite and TestLoader as attributes of bzrlib.tests
(John A Meinel)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/test_selftest.py test_selftest.py-20051202044319-c110a115d8c0456a
=== modified file 'NEWS'
--- a/NEWS 2010-09-03 01:32:46 +0000
+++ b/NEWS 2010-09-03 02:53:10 +0000
@@ -154,6 +154,10 @@
users to attach to their own processes by default.
(Martin Pool, #626679)
+* Test classes like ``TestCase``, ``TestLoader``, and ``TestSuite`` should
+ be available from ``bzrlib.tests.*``. They used to be, but were
+ accidentally removed. (John Arbash Meinel, #627438)
+
* ``Transport.stat`` on a symlink, including a transport pointing directly
to a symlink, now returns information about the symlink.
(Martin Pool)
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py 2010-09-03 01:32:46 +0000
+++ b/bzrlib/tests/__init__.py 2010-09-03 02:53:10 +0000
@@ -135,6 +135,10 @@
SUBUNIT_SEEK_SET = 0
SUBUNIT_SEEK_CUR = 1
+# These are intentionally brought into this namespace. That way plugins, etc
+# can just "from bzrlib.tests import TestCase, TestLoader, etc"
+TestSuite = TestUtil.TestSuite
+TestLoader = TestUtil.TestLoader
class ExtendedTestResult(testtools.TextTestResult):
"""Accepts, reports and accumulates the results of running tests.
=== modified file 'bzrlib/tests/test_selftest.py'
--- a/bzrlib/tests/test_selftest.py 2010-08-17 22:24:01 +0000
+++ b/bzrlib/tests/test_selftest.py 2010-09-02 20:17:03 +0000
@@ -122,6 +122,19 @@
self.failUnlessExists(filename)
+class TestClassesAvailable(tests.TestCase):
+ """As a convenience we expose Test* classes from bzrlib.tests"""
+
+ def test_test_case(self):
+ from bzrlib.tests import TestCase
+
+ def test_test_loader(self):
+ from bzrlib.tests import TestLoader
+
+ def test_test_suite(self):
+ from bzrlib.tests import TestSuite
+
+
class TestTransportScenarios(tests.TestCase):
"""A group of tests that test the transport implementation adaption core.
More information about the bazaar-commits
mailing list