Rev 5957: (jelmer) Split out ImportTariffTestCase so it can be used by plugins. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Jun 6 12:52:11 UTC 2011


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5957 [merge]
revision-id: pqm at pqm.ubuntu.com-20110606125209-j8r8jiltfjypii3i
parent: pqm at pqm.ubuntu.com-20110606091041-53fx29pxzgpxo1gu
parent: jelmer at samba.org-20110606115709-edqifngae6okqize
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2011-06-06 12:52:09 +0000
message:
  (jelmer) Split out ImportTariffTestCase so it can be used by plugins.
   (Jelmer Vernooij)
modified:
  bzrlib/tests/test_import_tariff.py test_import_tariff.p-20100207155145-ff9infp7goncs7zh-1
  doc/en/release-notes/bzr-2.4.txt bzr2.4.txt-20110114053217-k7ym9jfz243fddjm-1
=== modified file 'bzrlib/tests/test_import_tariff.py'
--- a/bzrlib/tests/test_import_tariff.py	2011-06-01 10:03:46 +0000
+++ b/bzrlib/tests/test_import_tariff.py	2011-06-06 11:57:09 +0000
@@ -53,7 +53,7 @@
     ]
 
 
-class TestImportTariffs(TestCaseWithTransport):
+class ImportTariffTestCase(TestCaseWithTransport):
     """Check how many modules are loaded for some representative scenarios.
 
     See the Testing Guide in the developer documentation for more explanation.
@@ -72,7 +72,7 @@
         for name in ('BZR_PLUGIN_PATH', 'BZR_DISABLE_PLUGINS', 'BZR_PLUGINS_AT'
                      ):
             self.preserved_env_vars[name] = os.environ.get(name)
-        super(TestImportTariffs, self).setUp()
+        super(ImportTariffTestCase, self).setUp()
 
     def start_bzr_subprocess_with_import_check(self, args, stderr_file=None):
         """Run a bzr process and capture the imports.
@@ -141,6 +141,10 @@
         self.finish_bzr_subprocess_with_import_check(process, args,
             forbidden_imports)
 
+
+class TestImportTariffs(ImportTariffTestCase):
+    """Basic import tariff tests for some common bzr commands"""
+
     def test_import_tariffs_working(self):
         # check some guaranteed-true and false imports to be sure we're
         # measuring correctly

=== modified file 'doc/en/release-notes/bzr-2.4.txt'
--- a/doc/en/release-notes/bzr-2.4.txt	2011-06-01 13:43:12 +0000
+++ b/doc/en/release-notes/bzr-2.4.txt	2011-06-06 11:13:41 +0000
@@ -93,6 +93,10 @@
    suite.  This can include new facilities for writing tests, fixes to 
    spurious test failures and changes to the way things should be tested.
 
+* A `ImportTariffTestCase` base class has been added in
+  ``bzrlib.tests.test_import_tariff``, which can be used for import tariff
+  tests in plugins. (Jelmer Vernooij, #793465)
+
 * Fix deadlock in `TestImportTariffs.test_simple_serve` when stderr gets
   more output than fits in the default buffer.  This was happening on the
   Windows buildslave, and could easily happen in other circumstances where




More information about the bazaar-commits mailing list