~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_inv.py

[merge] Aaron's tree-transform changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
479
479
 
480
480
        self.failUnless(t2.is_executable(a_id), "'a' lost the execute bit")
481
481
        self.failIf(t2.is_executable(b_id), "'b' gained an execute bit")
 
482
 
 
483
class TestRevert(TestCaseWithTransport):
 
484
    def test_dangling_id(self):
 
485
        wt = self.make_branch_and_tree('b1')
 
486
        self.assertEqual(len(wt.inventory), 1)
 
487
        open('b1/a', 'wb').write('a test\n')
 
488
        wt.add('a')
 
489
        self.assertEqual(len(wt.inventory), 2)
 
490
        os.unlink('b1/a')
 
491
        wt.revert([])
 
492
        self.assertEqual(len(wt.inventory), 1)