~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testhashcache.py

  • Committer: Martin Pool
  • Date: 2005-07-08 02:13:10 UTC
  • Revision ID: mbp@sourcefrog.net-20050708021310-9b783f93430d2983
- add HashCache.write and a simple test for it

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    
33
33
 
34
34
 
35
 
class TestStatCache(InTempDir):
 
35
class TestHashCache(InTempDir):
36
36
    """Functional tests for statcache"""
37
37
    def runTest(self):
38
38
        from bzrlib.hashcache import HashCache
69
69
                          '3c8ec4874488f6090a157b014ce3397ca8e06d4f')
70
70
        self.assertEquals(hc.miss_count, 2)
71
71
 
 
72
        hc.write('stat-cache')
 
73
 
72
74
        # quickly write new file of same size and make sure it is seen
73
75
        # this may rely on detection of timestamps that are too close
74
76
        # together to be safe
82
84
 
83
85
        self.assertEquals(hc.get_sha1('subdir'), None)
84
86
 
85
 
        #hc.write('stat-cache')
86
 
        #del hc
87
87
        
88
 
 
89
 
 
90
 
 
91
 
TEST_CLASSES = [
92
 
    TestStatCache,
93
 
    ]