~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

  • Committer: Martin Pool
  • Date: 2011-06-19 02:24:39 UTC
  • mfrom: (5985 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6001.
  • Revision ID: mbp@canonical.com-20110619022439-u68683yb2bw302x0
resolve conflicts against trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
285
285
        new_trans_id = transform.new_directory('', ROOT_PARENT, 'alt-root-id')
286
286
        self.assertRaises(ValueError, transform.fixup_new_roots)
287
287
 
 
288
    def test_add_unversioned_root(self):
 
289
        transform, root = self.get_transform()
 
290
        new_trans_id = transform.new_directory('', ROOT_PARENT, None)
 
291
        transform.fixup_new_roots()
 
292
        self.assertNotIn(transform.root, transform._new_id)
 
293
 
 
294
    def test_apply_retains_root_directory(self):
 
295
        # Do not attempt to delete the physical root directory, because that
 
296
        # is impossible.
 
297
        transform, root = self.get_transform()
 
298
        with transform:
 
299
            transform.delete_contents(root)
 
300
            e = self.assertRaises(AssertionError, self.assertRaises,
 
301
                                  errors.TransformRenameFailed,
 
302
                                  transform.apply)
 
303
        self.assertContainsRe('TransformRenameFailed not raised', str(e))
 
304
 
288
305
    def test_hardlink(self):
289
306
        self.requireFeature(HardlinkFeature)
290
307
        transform, root = self.get_transform()