Rev 5939: Better explain why tariff tests need to escape the test isolation jail. in file:///home/vila/src/bzr/cleanup/explain-tariff-tests/

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon May 30 07:36:54 UTC 2011


At file:///home/vila/src/bzr/cleanup/explain-tariff-tests/

------------------------------------------------------------
revno: 5939
revision-id: v.ladeuil+lp at free.fr-20110530073653-0ht7lo4ux9iv7u23
parent: pqm at pqm.ubuntu.com-20110529162246-bwwmjj18mj717e3i
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: explain-tariff-tests
timestamp: Mon 2011-05-30 09:36:53 +0200
message:
  Better explain why tariff tests need to escape the test isolation jail.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_import_tariff.py'
--- a/bzrlib/tests/test_import_tariff.py	2011-05-28 10:51:18 +0000
+++ b/bzrlib/tests/test_import_tariff.py	2011-05-30 07:36:53 +0000
@@ -56,6 +56,14 @@
     """Check how many modules are loaded for some representative scenarios.
 
     See the Testing Guide in the developer documentation for more explanation.
+
+
+    We must respect the setup used by the selftest command regarding
+    plugins. This allows the user to control which plugins are in effect while
+    running these tests and respect the import policies defined here.
+
+    When failures are encountered for a given plugin, they can generally be
+    addressed by using lazy import or lazy hook registration.
     """
 
     def setUp(self):
@@ -65,6 +73,7 @@
                      'BZR_PLUGINS_AT', 'HOME'):
             self.preserved_env_vars[name] = os.environ.get(name)
         super(TestImportTariffs, self).setUp()
+        # We don't want to pollute the user's .bzr.log so we define our own.
         self.log_path = osutils.pathjoin(self.test_home_dir, '.bzr.log')
         self.overrideEnv('BZR_LOG', self.log_path)
 

=== modified file 'doc/developers/testing.txt'
--- a/doc/developers/testing.txt	2011-04-05 12:11:26 +0000
+++ b/doc/developers/testing.txt	2011-05-30 07:36:53 +0000
@@ -516,9 +516,9 @@
 regress.
 
 This is done by running the command in a subprocess with
-``--profile-imports``.  Starting a whole Python interpreter is pretty
-slow, so we don't want exhaustive testing here, but just enough to guard
-against distinct fixed problems.
+``PYTHON_VERBOSE=1``.  Starting a whole Python interpreter is pretty slow,
+so we don't want exhaustive testing here, but just enough to guard against
+distinct fixed problems.
 
 Assertions about precisely what is loaded tend to be brittle so we instead
 make assertions that particular things aren't loaded.



More information about the bazaar-commits mailing list