test-filecache.py: make setbeforeget test clearer
authorSiddharth Agarwal <sid0@fb.com>
Sat, 16 Nov 2013 14:10:28 -0800
changeset 20040 ed80cecdfc57
parent 20039 05626e87489c
child 20041 42deff43460a
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.
tests/test-filecache.py
tests/test-filecache.py.out
--- 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