/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_hashcache.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-22 00:56:52 UTC
  • mfrom: (6621.2.26 py3_pokes)
  • Revision ID: jelmer@jelmer.uk-20170522005652-yjahcr9hwmjkno7n
Merge Python3 porting work ('py3 pokes')

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
import stat
19
19
import time
20
20
 
21
 
from breezy import osutils
22
 
from breezy.errors import BzrError
23
 
from breezy.hashcache import HashCache
24
 
from breezy.tests import (
 
21
from .. import osutils
 
22
from ..errors import BzrError
 
23
from ..hashcache import HashCache
 
24
from . import (
25
25
    TestCaseInTempDir,
26
26
    )
27
 
from breezy.tests.features import (
 
27
from .features import (
28
28
    OsFifoFeature,
29
29
    )
30
30
 
42
42
    def make_hashcache(self):
43
43
        # make a dummy bzr directory just to hold the cache
44
44
        os.mkdir('.bzr')
45
 
        hc = HashCache('.', '.bzr/stat-cache')
 
45
        hc = HashCache(u'.', '.bzr/stat-cache')
46
46
        return hc
47
47
 
48
48
    def reopen_hashcache(self):
49
 
        hc = HashCache('.', '.bzr/stat-cache')
 
49
        hc = HashCache(u'.', '.bzr/stat-cache')
50
50
        hc.read()
51
51
        return hc
52
52
 
133
133
    def __init__(self):
134
134
        # set root and cache file name to none to make sure we won't touch the
135
135
        # real filesystem
136
 
        HashCache.__init__(self, '.', 'hashcache')
 
136
        HashCache.__init__(self, u'.', 'hashcache')
137
137
        self._files = {}
138
138
        # simulated clock running forward as operations happen
139
139
        self._clock = 0
147
147
        return (len(entry[0]),
148
148
                entry[1], entry[1],
149
149
                10, 20,
150
 
                stat.S_IFREG | 0600)
 
150
                stat.S_IFREG | 0o600)
151
151
 
152
152
    def _really_sha1_file(self, abspath, filters):
153
153
        if abspath in self._files: