~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/workingtree_implementations/test_workingtree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-03-10 04:18:34 UTC
  • mfrom: (2330.1.1 bzr.ab.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070310041834-3f63de9e93982669
Allow files to change kind in Tree.list_files

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
            ('zz_dir/subfile', 'file'),
84
84
            ], files)
85
85
 
 
86
    def test_list_files_kind_change(self):
 
87
        tree = self.make_branch_and_tree('tree')
 
88
        self.build_tree(['tree/filename'])
 
89
        tree.add('filename', 'file-id')
 
90
        os.unlink('tree/filename')
 
91
        self.build_tree(['tree/filename/'])
 
92
        tree.lock_read()
 
93
        self.addCleanup(tree.unlock)
 
94
        result = list(tree.list_files())
 
95
        self.assertEqual(1, len(result))
 
96
        self.assertEqual(('filename', 'V', 'directory', 'file-id'),
 
97
                         result[0][:4])
 
98
 
86
99
    def test_open_containing(self):
87
100
        branch = self.make_branch_and_tree('.').branch
88
101
        local_base = urlutils.local_path_from_url(branch.base)