~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_hashcache.py

[merge] bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
import os
 
18
import sys
18
19
import time
19
 
from bzrlib.selftest import TestCaseInTempDir
 
20
from bzrlib.tests import TestCaseInTempDir
20
21
 
21
22
 
22
23
 
28
29
def pause():
29
30
    if False:
30
31
        return
31
 
    if os.name == 'nt':
 
32
    if sys.platform in ('win32', 'cygwin'):
32
33
        time.sleep(3)
33
34
        return
34
35
    # allow it to stabilize
46
47
 
47
48
        # make a dummy bzr directory just to hold the cache
48
49
        os.mkdir('.bzr')
49
 
        hc = HashCache('.')
 
50
        hc = HashCache(u'.')
50
51
 
51
52
        file('foo', 'wb').write('hello')
52
53
        os.mkdir('subdir')
109
110
        hc.write()
110
111
        del hc
111
112
 
112
 
        hc = HashCache('.')
 
113
        hc = HashCache(u'.')
113
114
        hc.read()
114
115
 
115
116
        ##self.assertEquals(len(hc._cache), 2)