/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/workingtree_implementations/test_workingtree.py

merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import os
20
20
import sys
21
21
 
 
22
from bzrlib import ignores
22
23
import bzrlib
23
24
from bzrlib import branch, bzrdir, errors, osutils, urlutils, workingtree
24
 
from bzrlib.errors import (NotBranchError, NotVersionedError, 
 
25
from bzrlib.errors import (NotBranchError, NotVersionedError,
25
26
                           UnsupportedOperation, PathsNotVersionedError)
26
27
from bzrlib.osutils import pathjoin, getcwd, has_symlinks
27
28
from bzrlib.tests import TestSkipped
48
49
 
49
50
    def test_list_files_sorted(self):
50
51
        tree = self.make_branch_and_tree('.')
51
 
        self.build_tree(['dir/', 'file', 'dir/file', 'dir/b', 'dir/subdir/', 'a', 'dir/subfile',
52
 
                'zz_dir/', 'zz_dir/subfile'])
53
 
        files = [(path, kind) for (path, versioned, kind, file_id, entry) in tree.list_files()]
 
52
        ignores._set_user_ignores(['./.bazaar'])
 
53
        self.build_tree(['dir/', 'file', 'dir/file', 'dir/b',
 
54
                         'dir/subdir/', 'a', 'dir/subfile',
 
55
                         'zz_dir/', 'zz_dir/subfile'])
 
56
        files = [(path, kind) for (path, v, kind, file_id, entry)
 
57
                               in tree.list_files()]
54
58
        self.assertEqual([
 
59
            ('.bazaar', 'directory'),
55
60
            ('a', 'file'),
56
61
            ('dir', 'directory'),
57
62
            ('file', 'file'),
59
64
            ], files)
60
65
 
61
66
        tree.add(['dir', 'zz_dir'])
62
 
        files = [(path, kind) for (path, versioned, kind, file_id, entry) in tree.list_files()]
 
67
        files = [(path, kind) for (path, v, kind, file_id, entry)
 
68
                               in tree.list_files()]
63
69
        self.assertEqual([
 
70
            ('.bazaar', 'directory'),
64
71
            ('a', 'file'),
65
72
            ('dir', 'directory'),
66
73
            ('dir/b', 'file'),
628
635
        osutils.normalized_filename = osutils._accessible_normalized_filename
629
636
        try:
630
637
            tree.add([u'a\u030a'])
631
 
            self.assertEqual([(u'\xe5', 'file')],
 
638
            self.assertEqual([('', 'root_directory'), (u'\xe5', 'file')],
632
639
                    [(path, ie.kind) for path,ie in 
633
640
                                tree.inventory.iter_entries()])
634
641
        finally: