Rev 5939: (vila) Why tariff tests escape the isolation jail (Vincent Ladeuil) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon May 30 16:13:27 UTC 2011
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5939 [merge]
revision-id: pqm at pqm.ubuntu.com-20110530161324-q4hj82ijys8lg6j2
parent: pqm at pqm.ubuntu.com-20110529162246-bwwmjj18mj717e3i
parent: v.ladeuil+lp at free.fr-20110530073653-0ht7lo4ux9iv7u23
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2011-05-30 16:13:24 +0000
message:
(vila) Why tariff tests escape the isolation jail (Vincent Ladeuil)
modified:
bzrlib/tests/test_import_tariff.py test_import_tariff.p-20100207155145-ff9infp7goncs7zh-1
doc/developers/testing.txt testing.txt-20080812140359-i70zzh6v2z7grqex-1
=== 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