Rev 5943: Even better to not rely on an implementation detail. in file:///home/vila/src/bzr/reviews/test_import_tariff-isolation/

Vincent Ladeuil v.ladeuil+lp at free.fr
Wed Jun 1 10:03:46 UTC 2011


At file:///home/vila/src/bzr/reviews/test_import_tariff-isolation/

------------------------------------------------------------
revno: 5943
revision-id: v.ladeuil+lp at free.fr-20110601100346-zpf0vaxulj1qm5aw
parent: andrew.bennetts at canonical.com-20110601061418-vq6xqegy6250vxrp
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: test_import_tariff-isolation
timestamp: Wed 2011-06-01 12:03:46 +0200
message:
  Even better to not rely on an implementation detail.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_import_tariff.py'
--- a/bzrlib/tests/test_import_tariff.py	2011-05-31 06:15:24 +0000
+++ b/bzrlib/tests/test_import_tariff.py	2011-06-01 10:03:46 +0000
@@ -69,7 +69,8 @@
 
     def setUp(self):
         self.preserved_env_vars = {}
-        for name in ('BZR_DISABLE_PLUGINS', 'BZR_PLUGINS_AT'):
+        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()
 
@@ -85,12 +86,7 @@
         # more likely to always show everything.  And we use the environment
         # variable rather than 'python -v' in the hope it will work even if
         # bzr is frozen and python is not explicitly specified. -- mbp 20100208
-        # We use BZR_PLUGIN_PATH to explicitly set the subprocess to use the
-        # same plugins as this process.
-        plugin_path = os.pathsep.join(
-            ['-core', '-site'] + _mod_plugins.__path__)
-        env_changes = dict(PYTHONVERBOSE='1', BZR_PLUGIN_PATH=plugin_path)
-        env_changes.update(self.preserved_env_vars)
+        env_changes = dict(PYTHONVERBOSE='1', **self.preserved_env_vars)
         trace.mutter('Setting env for bzr subprocess: %r', env_changes)
         kwargs = dict(env_changes=env_changes,
                       allow_plugins=(not are_plugins_disabled()))



More information about the bazaar-commits mailing list