Skip to content
Snippets Groups Projects
Commit 74cbbd54 authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

filecache: explicitly test 'repofilecache'

The tests is actually about testing a repofilecache (it uses a fake repo). We
make this clear to prevent blockers while cleaning theses API.
parent f84b0e92
No related branches found
No related tags found
No related merge requests found
......@@ -10,9 +10,9 @@
from mercurial import (
extensions,
hg,
scmutil,
localrepo,
ui as uimod,
util,
vfs as vfsmod,
)
......@@ -14,11 +14,9 @@
ui as uimod,
util,
vfs as vfsmod,
)
filecache = scmutil.filecache
class fakerepo(object):
def __init__(self):
self._filecache = {}
......@@ -21,10 +19,17 @@
class fakerepo(object):
def __init__(self):
self._filecache = {}
def join(self, p):
return p
class fakevfs(object):
def join(self, p):
return p
vfs = fakevfs()
def unfiltered(self):
return self
def sjoin(self, p):
return p
......@@ -27,8 +32,8 @@
def sjoin(self, p):
return p
@filecache('x', 'y')
@localrepo.repofilecache('x', 'y')
def cached(self):
print('creating')
return 'string from function'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment