~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_version.py

merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007, 2008 Canonical Ltd
 
1
# Copyright (C) 2007, 2008, 2009, 2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
95
95
            raise TestSkipped('Cannot find a unicode character that works in'
96
96
                              ' encoding %s' % (osutils.get_user_encoding(),))
97
97
 
98
 
        osutils.set_or_unset_env('BZR_HOME', str_val)
 
98
        self.overrideEnv('BZR_HOME', str_val)
99
99
        self.permit_source_tree_branch_repo()
100
100
        out = self.run_bzr("version")[0]
101
101
        self.assertTrue(len(out) > 0)
106
106
 
107
107
    def test_simple(self):
108
108
        bzr_log = 'my.bzr.log'
109
 
        osutils.set_or_unset_env('BZR_LOG', bzr_log)
 
109
        self.overrideEnv('BZR_LOG', bzr_log)
110
110
        default_log = os.path.join(os.environ['BZR_HOME'], '.bzr.log')
111
111
        self.failIfExists([default_log, bzr_log])
112
112
        out = self.run_bzr_subprocess('version')[0]
122
122
            bzr_log = 'NUL'
123
123
        else:
124
124
            bzr_log = '/dev/null'
125
 
        osutils.set_or_unset_env('BZR_LOG', bzr_log)
 
125
        self.overrideEnv('BZR_LOG', bzr_log)
126
126
        default_log = os.path.join(os.environ['BZR_HOME'], '.bzr.log')
127
127
        self.failIfExists(default_log)
128
128
        out = self.run_bzr_subprocess('version')[0]