# HG changeset patch # User Pierre-Yves David # Date 1489020196 28800 # Node ID 74cbbd5420ba93bbf834ec31428d7c5bbf52bdc4 # Parent f84b0e926eb21efb49f32221be655f650f7c1d4d 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. diff -r f84b0e926eb2 -r 74cbbd5420ba tests/test-filecache.py --- a/tests/test-filecache.py Fri Aug 05 14:25:21 2016 +0200 +++ b/tests/test-filecache.py Wed Mar 08 16:43:16 2017 -0800 @@ -10,25 +10,30 @@ from mercurial import ( extensions, hg, - scmutil, + localrepo, ui as uimod, util, vfs as vfsmod, ) -filecache = scmutil.filecache - 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 - @filecache('x', 'y') + @localrepo.repofilecache('x', 'y') def cached(self): print('creating') return 'string from function'