~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree_4.py

  • Committer: Robert Collins
  • Date: 2009-08-04 04:36:34 UTC
  • mfrom: (4583 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4593.
  • Revision ID: robertc@robertcollins.net-20090804043634-2iu9wpcgs273i97s
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
579
579
        self.assertEqual([], changes)
580
580
        self.assertEqual(['', 'versioned', 'versioned2'], returned)
581
581
 
 
582
    def test_iter_changes_unversioned_error(self):
 
583
        """ Check if a PathsNotVersionedError is correctly raised and the
 
584
            paths list contains all unversioned entries only.
 
585
        """
 
586
        tree = self.make_branch_and_tree('tree')
 
587
        self.build_tree_contents([('tree/bar', '')])
 
588
        tree.add(['bar'], ['bar-id'])
 
589
        tree.lock_read()
 
590
        self.addCleanup(tree.unlock)
 
591
        tree_iter_changes = lambda files: [
 
592
            c for c in tree.iter_changes(tree.basis_tree(), specific_files=files,
 
593
                                         require_versioned=True)
 
594
        ]
 
595
        e = self.assertRaises(errors.PathsNotVersionedError,
 
596
                              tree_iter_changes, ['bar', 'foo'])
 
597
        self.assertEqual(e.paths, ['foo'])
 
598
 
582
599
    def get_tree_with_cachable_file_foo(self):
583
600
        tree = self.make_branch_and_tree('.')
584
601
        self.build_tree(['foo'])