~bzr/ubuntu/lucid/bzr/bzr-ppa

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Max Bowsher
  • Date: 2011-09-16 06:28:04 UTC
  • mfrom: (136.1.20 maverick)
  • Revision ID: _@maxb.eu-20110916062804-807ozc7hvn4oeld1
Tags: 2.4.1-1~bazaar1~lucid1
MergeĀ 2.4.1-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2537
2537
        real branch.
2538
2538
        """
2539
2539
        root = TestCaseWithMemoryTransport.TEST_ROOT
2540
 
        wt = bzrdir.BzrDir.create_standalone_workingtree(root)
 
2540
        try:
 
2541
            # Make sure we get a readable and accessible home for .bzr.log
 
2542
            # and/or config files, and not fallback to weird defaults (see
 
2543
            # http://pad.lv/825027).
 
2544
            self.assertIs(None, os.environ.get('BZR_HOME', None))
 
2545
            os.environ['BZR_HOME'] = root
 
2546
            wt = bzrdir.BzrDir.create_standalone_workingtree(root)
 
2547
            del os.environ['BZR_HOME']
 
2548
        except Exception, e:
 
2549
            self.fail("Fail to initialize the safety net: %r\nExiting\n" % (e,))
2541
2550
        # Hack for speed: remember the raw bytes of the dirstate file so that
2542
2551
        # we don't need to re-open the wt to check it hasn't changed.
2543
2552
        TestCaseWithMemoryTransport._SAFETY_NET_PRISTINE_DIRSTATE = (