~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_workingtree/test_inv.py

  • Committer: Jelmer Vernooij
  • Date: 2011-05-10 07:46:15 UTC
  • mfrom: (5844 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5845.
  • Revision ID: jelmer@samba.org-20110510074615-eptod049ndjxc4i7
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
 
20
20
import os
21
 
import time
22
21
 
23
 
from bzrlib import (
24
 
    errors,
25
 
    inventory,
26
 
    )
 
22
from bzrlib import inventory
27
23
from bzrlib.tests.per_workingtree import TestCaseWithWorkingTree
28
24
 
29
25
 
33
29
        wt = self.make_branch_and_tree('b1')
34
30
        wt.lock_tree_write()
35
31
        self.addCleanup(wt.unlock)
36
 
        self.assertEqual(len(wt.inventory), 1)
 
32
        self.assertEqual(len(wt.all_file_ids()), 1)
37
33
        open('b1/a', 'wb').write('a test\n')
38
34
        wt.add('a')
39
 
        self.assertEqual(len(wt.inventory), 2)
 
35
        self.assertEqual(len(wt.all_file_ids()), 2)
40
36
        wt.flush() # workaround revert doing wt._write_inventory for now.
41
37
        os.unlink('b1/a')
42
38
        wt.revert()
43
 
        self.assertEqual(len(wt.inventory), 1)
 
39
        self.assertEqual(len(wt.all_file_ids()), 1)
44
40
 
45
41
 
46
42
class TestApplyInventoryDelta(TestCaseWithWorkingTree):