/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_win32utils.py

  • Committer: Mark Hammond
  • Date: 2008-09-19 00:47:24 UTC
  • mto: This revision was merged to the branch mainline in revision 3728.
  • Revision ID: mhammond@skippinet.com.au-20080919004724-bfkrvt4pp8zpf7cm
 Skip the environment checks when APPDATA isn't in the environment.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
import sys
19
19
 
20
20
from bzrlib import osutils
21
 
from bzrlib.tests import TestCase, TestCaseInTempDir, Feature
 
21
from bzrlib.tests import TestCase, TestCaseInTempDir, TestSkipped, Feature
22
22
from bzrlib.win32utils import glob_expand, get_app_path
23
23
from bzrlib import win32utils
24
24
 
191
191
        # get_appdata_location
192
192
        # XXX - See bug 262874, which asserts the correct encoding is 'mbcs',
193
193
        encoding = osutils.get_user_encoding()
 
194
        env_val = os.environ.get("APPDATA", None)
 
195
        if not env_val:
 
196
            raise TestSkipped("No APPDATA environment variable exists")
194
197
        self.assertPathsEqual(win32utils.get_appdata_location(),
195
 
                              os.environ["APPDATA"].decode(encoding))
 
198
                              env_val.decode(encoding))
196
199
 
197
200
    def test_local_appdata_not_using_environment(self):
198
201
        # Test that we aren't falling back to the environment