# HG changeset patch # User Siddharth Agarwal # Date 2013-11-16 22:10:28 # Node ID ed80cecdfc57cd5a6eac397662efd4c630ea074a # Parent 05626e87489ce6514b911eaf647586119a5563d0 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. diff --git a/tests/test-filecache.py b/tests/test-filecache.py --- a/tests/test-filecache.py +++ b/tests/test-filecache.py @@ -21,6 +21,7 @@ class fakerepo(object): @filecache('x') def cached(self): print 'creating' + return 'string from function' def invalidate(self): for k in self._filecache: @@ -103,7 +104,7 @@ def test_filecache_synced(): def setbeforeget(repo): os.remove('x') - repo.cached = 0 + repo.cached = 'string set externally' repo.invalidate() print repo.cached repo.invalidate() diff --git a/tests/test-filecache.py.out b/tests/test-filecache.py.out --- a/tests/test-filecache.py.out +++ b/tests/test-filecache.py.out @@ -20,6 +20,6 @@ working directory now based on revision setbeforeget: -0 +string set externally creating -None +string from function