~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_win32utils.py

  • Committer: Alexander Belchenko
  • Date: 2009-07-03 14:26:34 UTC
  • mto: (4506.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4507.
  • Revision ID: bialix@ukr.net-20090703142634-nnnan3bfbx33a2ly
guard tests with UnicodeFilenameFeature.

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, TestSkipped, Feature
 
21
from bzrlib.tests import (
 
22
    Feature,
 
23
    TestCase,
 
24
    TestCaseInTempDir,
 
25
    TestSkipped,
 
26
    UnicodeFilenameFeature,
 
27
    )
22
28
from bzrlib.win32utils import glob_expand, get_app_path
23
29
from bzrlib import win32utils
24
30
 
244
250
 
245
251
    def test_unicode_dir(self):
246
252
        # we should handle unicode paths without errors
 
253
        self.requireFeature(UnicodeFilenameFeature)
247
254
        os.mkdir(u'\u1234')
248
255
        win32utils.set_file_attr_hidden(u'\u1234')
249
256
 
250
257
    def test_dot_bzr_in_unicode_dir(self):
251
258
        # we should not raise traceback if we try to set hidden attribute
252
259
        # on .bzr directory below unicode path
 
260
        self.requireFeature(UnicodeFilenameFeature)
253
261
        os.makedirs(u'\u1234\\.bzr')
254
262
        path = osutils.abspath(u'\u1234\\.bzr')
255
263
        win32utils.set_file_attr_hidden(path)