~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

* TestCaseWithMemoryTransport no longer sets $HOME and $BZR_HOME to
        unicode strings. (Michael Hudson, #464174)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2475
2475
        return branchbuilder.BranchBuilder(branch=branch)
2476
2476
 
2477
2477
    def overrideEnvironmentForTesting(self):
2478
 
        os.environ['HOME'] = self.test_home_dir
2479
 
        os.environ['BZR_HOME'] = self.test_home_dir
 
2478
        test_home_dir = self.test_home_dir
 
2479
        if isinstance(test_home_dir, unicode):
 
2480
            test_home_dir = test_home_dir.encode(sys.getfilesystemencoding())
 
2481
        os.environ['HOME'] = test_home_dir
 
2482
        os.environ['BZR_HOME'] = test_home_dir
2480
2483
 
2481
2484
    def setUp(self):
2482
2485
        super(TestCaseWithMemoryTransport, self).setUp()