summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Hutchinson <jlhutch@gmail.com>2010-09-16 15:54:55 -0500
committerJay Hutchinson <jlhutch@gmail.com>2010-09-16 15:54:55 -0500
commit8d09ccde0b2743c666d8b4eafa6ae306a785baea (patch)
tree063a923eee230a94949c466b79ecb5da23171629
parent15b4d1a3ffd4076f96f241988b4fc81a24a9cfc1 (diff)
downloadpylru-8d09ccde0b2743c666d8b4eafa6ae306a785baea.tar.gz
Small bug fix to test code. Updated setup script to list PyLRU as v1.0v1.0.0
-rw-r--r--MANIFEST.in1
-rw-r--r--setup.py4
-rw-r--r--test.py19
3 files changed, 12 insertions, 12 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
index 42eb410..4dde919 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1 +1,2 @@
include LICENSE.txt
+include test.py
diff --git a/setup.py b/setup.py
index 073b43e..2434e20 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from distutils.core import setup
setup(
name = "pylru",
- version = "0.9.1",
+ version = "1.0.0",
py_modules=['pylru'],
description = "A least recently used (LRU) cache implementation",
author = "Jay Hutchinson",
@@ -12,7 +12,7 @@ setup(
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
- "Development Status :: 4 - Beta",
+ "Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Operating System :: OS Independent",
diff --git a/test.py b/test.py
index 6a7167d..fd849d0 100644
--- a/test.py
+++ b/test.py
@@ -2,7 +2,6 @@
from pylru import *
import random
-
class simplelrucache:
def __init__(self, size):
@@ -29,7 +28,7 @@ class simplelrucache:
self.cache.append(x)
return x[1]
- assert False
+ raise KeyError
def __setitem__(self, key, obj):
@@ -47,8 +46,7 @@ class simplelrucache:
self.cache.append([key, obj])
- return
-
+
def __delitem__(self, key):
for i in range(len(self.cache)):
@@ -56,7 +54,7 @@ class simplelrucache:
del self.cache[i]
return
- return
+ raise KeyError
def test(a, b, c, d, verify):
@@ -164,11 +162,12 @@ if __name__ == '__main__':
random.seed()
- testcache()
- wraptest()
- wraptest2()
- wraptest3()
- testDecorator()
+ for i in range(20):
+ testcache()
+ wraptest()
+ wraptest2()
+ wraptest3()
+ testDecorator()