~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testhashcache.py

  • Committer: Aaron Bentley
  • Date: 2005-07-29 17:19:16 UTC
  • mto: (1092.1.41) (1185.3.4) (974.1.47)
  • mto: This revision was merged to the branch mainline in revision 1020.
  • Revision ID: abentley@panoramicfeedback.com-20050729171916-322fd81b451d2e3e
Added merge-type parameter to merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
 
from bzrlib.selftest import TestCaseInTempDir
 
17
from bzrlib.selftest import InTempDir
18
18
 
19
19
 
20
20
 
31
31
        time.sleep(0.2)
32
32
    
33
33
 
34
 
class TestHashCache(TestCaseInTempDir):
35
34
 
36
 
    def test_hashcache(self):
37
 
        """Functional tests for hashcache"""
 
35
class TestHashCache(InTempDir):
 
36
    """Functional tests for hashcache"""
 
37
    def runTest(self):
38
38
        from bzrlib.hashcache import HashCache
39
39
        import os
 
40
        import time
40
41
 
41
42
        # make a dummy bzr directory just to hold the cache
42
43
        os.mkdir('.bzr')
111
112
        self.assertEquals(hc.hit_count, 1)
112
113
        self.assertEquals(hc.miss_count, 0)
113
114
        self.assertEquals(hc.get_sha1('foo2'), sha1('new content'))
 
115
 
 
116
        
 
117
 
 
118
        
 
119