~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2007-03-01 06:19:44 UTC
  • mto: (2255.11.3 dirstate)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: robertc@robertcollins.net-20070301061944-y1jw05ufqdpw4yx5
Update the Tree.filter_unversioned_files docstring to reflect what the existing implementations actually do, and change the WorkingTree4 implementation to match a newly created test for it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
742
742
            tree.unlock()
743
743
 
744
744
    def test_path2id(self):
 
745
        # smoke test for path2id
745
746
        tree = self.make_branch_and_tree('.')
746
747
        self.build_tree(['foo'])
747
748
        tree.add(['foo'], ['foo-id'])
750
751
        # though its probably a bad idea, it makes things work. Perhaps
751
752
        # it should raise a deprecation warning?
752
753
        self.assertEqual('foo-id', tree.path2id('foo/'))
 
754
 
 
755
    def test_filter_unversioned_files(self):
 
756
        # smoke test for filter_unversioned_files
 
757
        tree = self.make_branch_and_tree('.')
 
758
        paths = ['here-and-versioned', 'here-and-not-versioned',
 
759
            'not-here-and-versioned', 'not-here-and-not-versioned']
 
760
        tree.add(['here-and-versioned', 'not-here-and-versioned'],
 
761
            kinds=['file', 'file'])
 
762
        self.build_tree(['here-and-versioned', 'here-and-not-versioned'])
 
763
        tree.lock_read()
 
764
        self.addCleanup(tree.unlock)
 
765
        self.assertEqual(
 
766
            set(['not-here-and-not-versioned', 'here-and-not-versioned']),
 
767
            tree.filter_unversioned_files(paths))