~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-07-12 10:09:27 UTC
  • mfrom: (1845.1.3 bzr.mbp.hashcache)
  • Revision ID: pqm@pqm.ubuntu.com-20060712100927-6af9cbe9c9e6af3b
(mbp) hashcache fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
182
182
        self.assertEquals(list(tree.unknowns()),
183
183
                          ['hello.txt'])
184
184
 
185
 
    def test_hashcache(self):
186
 
        from bzrlib.tests.test_hashcache import pause
187
 
        tree = self.make_branch_and_tree('.')
188
 
        self.build_tree(['hello.txt',
189
 
                         'hello.txt.~1~'])
190
 
        tree.add('hello.txt')
191
 
        pause()
192
 
        sha = tree.get_file_sha1(tree.path2id('hello.txt'))
193
 
        self.assertEqual(1, tree._hashcache.miss_count)
194
 
        tree2 = WorkingTree.open('.')
195
 
        sha2 = tree2.get_file_sha1(tree2.path2id('hello.txt'))
196
 
        self.assertEqual(0, tree2._hashcache.miss_count)
197
 
        self.assertEqual(1, tree2._hashcache.hit_count)
198
 
 
199
185
    def test_initialize(self):
200
186
        # initialize should create a working tree and branch in an existing dir
201
187
        t = self.make_branch_and_tree('.')