/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_osutils.py

  • Committer: Eric Moritz
  • Date: 2010-06-08 00:12:16 UTC
  • mto: (5299.1.2 integration)
  • mto: This revision was merged to the branch mainline in revision 5302.
  • Revision ID: eric@themoritzfamily.com-20100608001216-kcoq35bfeqsbwzlg
1. used os.rename instead of shutil.move
2. Added code to skip the filesystem encoding test when on a non-posix system

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
import stat
25
25
import sys
26
26
import time
27
 
import shutil
28
27
 
29
28
from bzrlib import (
30
29
    errors,
1088
1087
    def test_walkdirs_encoding_error(self):
1089
1088
        # <https://bugs.launchpad.net/bzr/+bug/488519>
1090
1089
        # walkdirs didn't raise a useful message when the filenames
1091
 
        # were not the encoding specified at _fs_enc
 
1090
        # are not using the filesystem's encoding
 
1091
 
 
1092
        # If the filesystem is Unicode, skip the test
 
1093
        if os.name != 'posix':
 
1094
            self.skip('Test requires a posix style byte-based filesystem')
 
1095
            return 
 
1096
 
1092
1097
        tree = [
1093
1098
            '.bzr',
1094
1099
            '0file',
1101
1106
        self.build_tree(tree)
1102
1107
 
1103
1108
        # rename the 1file to a latin-1 filename
1104
 
        shutil.move("./1file", "\xe8file")
 
1109
        os.rename("./1file", "\xe8file")
1105
1110
 
1106
1111
        self._save_platform_info()
1107
1112
        win32utils.winver = None # Avoid the win32 detection code