~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_win32utils.py

  • Committer: Vincent Ladeuil
  • Date: 2011-02-11 16:15:39 UTC
  • mto: This revision was merged to the branch mainline in revision 5661.
  • Revision ID: v.ladeuil+lp@free.fr-20110211161539-26o5a28ihyemvuzg
Fix pqm failure on python2.4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007-2010 Canonical Ltd
 
1
# Copyright (C) 2007-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
17
17
"""Tests for win32utils."""
18
18
 
19
19
import os
20
 
import sys
21
20
 
22
21
from bzrlib import (
23
22
    osutils,
120
119
            ])
121
120
 
122
121
    def test_case_insensitive_globbing(self):
123
 
        self.requireFeature(tests.CaseInsCasePresFilenameFeature)
 
122
        if os.path.normcase("AbC") == "AbC":
 
123
            self.skip("Test requires case insensitive globbing function")
124
124
        self.build_ascii_tree()
125
125
        self._run_testset([
126
126
            [[u'A'], [u'A']],
216
216
    def test_appdata_not_using_environment(self):
217
217
        # Test that we aren't falling back to the environment
218
218
        first = win32utils.get_appdata_location()
219
 
        self._captureVar("APPDATA", None)
 
219
        self.overrideEnv("APPDATA", None)
220
220
        self.assertPathsEqual(first, win32utils.get_appdata_location())
221
221
 
222
222
    def test_appdata_matches_environment(self):
233
233
    def test_local_appdata_not_using_environment(self):
234
234
        # Test that we aren't falling back to the environment
235
235
        first = win32utils.get_local_appdata_location()
236
 
        self._captureVar("LOCALAPPDATA", None)
 
236
        self.overrideEnv("LOCALAPPDATA", None)
237
237
        self.assertPathsEqual(first, win32utils.get_local_appdata_location())
238
238
 
239
239
    def test_local_appdata_matches_environment(self):
326
326
            single_quotes_allowed=True)
327
327
 
328
328
    def test_case_insensitive_globs(self):
329
 
        self.requireFeature(tests.CaseInsCasePresFilenameFeature)
 
329
        if os.path.normcase("AbC") == "AbC":
 
330
            self.skip("Test requires case insensitive globbing function")
330
331
        self.build_tree(['a/', 'a/b.c', 'a/c.c', 'a/c.h'])
331
332
        self.assertCommandLine([u'A/b.c'], 'A/B*')
332
333