[MERGE] Tests fail if BZR_EMAIL is set

Adeodato Simó dato at net.com.org.es
Mon Aug 14 02:08:48 BST 2006

Hi all.

I was experiencing failures in random tests, and I finally narrowed it
down to the BZREMAIL -> BZR_EMAIL migration.

The code in config.py checks for $BZR_EMAIL and, if present, just
returns it, without looking up whether $BZREMAIL exists. This is good,
because compatibility with 0.8 can be achieved by just setting both
variables to the same value.

However, _cleanEnvironment() in tests/__init.py__ only clears BZR_EMAIL,
and not BZREMAIL, which leads to failures in tests that check the error

I think it'd be good to fix this, to have the transition be a truly
clean one.



Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
Hanlon's Razor: Never attribute to malice that which is adequately
explained by stupidity.
-------------- next part --------------
# Bazaar revision bundle v0.8
# message:
#   Clear $BZREMAIL in tests, not only the newer $BZR_EMAIL, since the
#   former may be still present in the environment, for users that want
#   compatibility with 0.8.
# committer: Adeodato Simó <dato at net.com.org.es>
# date: Mon 2006-08-14 03:00:54.891999960 +0200

=== modified file bzrlib/tests/__init__.py
--- bzrlib/tests/__init__.py
+++ bzrlib/tests/__init__.py
@@ -594,6 +594,7 @@
             'HOME': os.getcwd(),
             'APPDATA': os.getcwd(),
             'BZR_EMAIL': None,
+            'BZREMAIL': None, # may still be present in the environment
             'EMAIL': None,
         self.__old_env = {}

# revision id: dato at net.com.org.es-20060814010054-beab9e7c50331ac7
# sha1: dfc55d6aa3feece78984e2a15d4aa0035d818ff4
# inventory sha1: c1ea2eb9a7d67e9cf148192218a9cc5fbd22fe74
# parent ids:
#   pqm at pqm.ubuntu.com-20060810061423-3ae5999a70b60211
# base id: pqm at pqm.ubuntu.com-20060810061423-3ae5999a70b60211
# properties:
#   branch-nick: tests_unset_bzremail

More information about the bazaar mailing list