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.
--- 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()
--- a/tests/test-filecache.py.out Sun Nov 17 13:38:35 2013 -0500
+++ b/tests/test-filecache.py.out Sat Nov 16 14:10:28 2013 -0800
@@ -20,6 +20,6 @@
setbeforeget:
-0
+string set externally
creating
-None
+string from function