diff options
author | Raymond Hettinger <python@rcn.com> | 2010-09-04 22:46:06 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2010-09-04 22:46:06 (GMT) |
commit | 02566ec89f90e5696eef062414c69a7c7ee991df (patch) | |
tree | dc8ca5b5c0ca581ebdfaafd073d901c57e9137bd /Lib/test/test_functools.py | |
parent | e9a4de51ab5ba19d4b1295aadad0533eea394b0a (diff) | |
download | cpython-02566ec89f90e5696eef062414c69a7c7ee991df.zip cpython-02566ec89f90e5696eef062414c69a7c7ee991df.tar.gz cpython-02566ec89f90e5696eef062414c69a7c7ee991df.tar.bz2 |
Adopt more descriptive attribute names as suggested on python-dev.
Diffstat (limited to 'Lib/test/test_functools.py')
-rw-r--r-- | Lib/test/test_functools.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index 41a98a2..82ad889 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -508,21 +508,21 @@ class TestLRU(unittest.TestCase): actual = f(x, y) expected = orig(x, y) self.assertEquals(actual, expected) - self.assert_(f.hits > f.misses) - self.assertEquals(f.hits + f.misses, 1000) + self.assert_(f.cache_hits > f.cache_misses) + self.assertEquals(f.cache_hits + f.cache_misses, 1000) - f.clear() # test clearing - self.assertEqual(f.hits, 0) - self.assertEqual(f.misses, 0) + f.cache_clear() # test clearing + self.assertEqual(f.cache_hits, 0) + self.assertEqual(f.cache_misses, 0) f(x, y) - self.assertEqual(f.hits, 0) - self.assertEqual(f.misses, 1) + self.assertEqual(f.cache_hits, 0) + self.assertEqual(f.cache_misses, 1) # Test bypassing the cache self.assertIs(f.__wrapped__, orig) f.__wrapped__(x, y) - self.assertEqual(f.hits, 0) - self.assertEqual(f.misses, 1) + self.assertEqual(f.cache_hits, 0) + self.assertEqual(f.cache_misses, 1) # test size zero (which means "never-cache") @functools.lru_cache(0) |