Mercurial > hg
changeset 20040:ed80cecdfc57
test-filecache.py: make setbeforeget test clearer
'0' and 'None' as outputs tripped me up. Make the distinction between values
set externally and values computed by calling the decorated function clearer.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Sat, 16 Nov 2013 14:10:28 -0800 |
parents | 05626e87489c |
children | 42deff43460a |
files | tests/test-filecache.py tests/test-filecache.py.out |
diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-filecache.py Sun Nov 17 13:38:35 2013 -0500 +++ b/tests/test-filecache.py Sat Nov 16 14:10:28 2013 -0800 @@ -21,6 +21,7 @@ @filecache('x') def cached(self): print 'creating' + return 'string from function' def invalidate(self): for k in self._filecache: @@ -103,7 +104,7 @@ def setbeforeget(repo): os.remove('x') - repo.cached = 0 + repo.cached = 'string set externally' repo.invalidate() print repo.cached repo.invalidate()