fixed setup.py; fixed test_zset.py bug

This commit is contained in:
holys 2014-07-08 15:54:56 +08:00
parent e9dfea5f1e
commit 4630ab1115
2 changed files with 3 additions and 11 deletions

View File

@ -25,15 +25,12 @@ except ImportError:
from distutils.core import setup from distutils.core import setup
PyTest = lambda x: x PyTest = lambda x: x
f = open(os.path.join(os.path.dirname(__file__), 'README.rst'))
long_description = f.read()
f.close()
setup( setup(
name='ledis', name='ledis',
version=__version__, version=__version__,
description='Python client for ledis key-value store', description='Python client for ledisdb key-value database',
long_description=long_description, long_description='Python client for ledisdb key-value database',
url='https://github.com/siddontang/ledisdb', url='https://github.com/siddontang/ledisdb',
keywords=['ledis', 'key-value store'], keywords=['ledis', 'key-value store'],
license='MIT', license='MIT',
@ -49,9 +46,5 @@ setup(
'Programming Language :: Python', 'Programming Language :: Python',
'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
] ]
) )

View File

@ -66,7 +66,7 @@ class TestCmdZset(unittest.TestCase):
assert l.zrangebyscore('a', 2, 4, withscores=True) == \ assert l.zrangebyscore('a', 2, 4, withscores=True) == \
[('a2', 2), ('a3', 3), ('a4', 4)] [('a2', 2), ('a3', 3), ('a4', 4)]
def test_rank(self): def test_zrank(self):
l.zadd('a', a1=1, a2=2, a3=3, a4=4, a5=5) l.zadd('a', a1=1, a2=2, a3=3, a4=4, a5=5)
assert l.zrank('a', 'a1') == 0 assert l.zrank('a', 'a1') == 0
assert l.zrank('a', 'a3') == 2 assert l.zrank('a', 'a3') == 2
@ -167,4 +167,3 @@ class TestCmdZset(unittest.TestCase):
assert 0 < l.zttl('a') <= 100 assert 0 < l.zttl('a') <= 100
assert l.zpersist('a') assert l.zpersist('a')
assert l.zttl('a') == -1 assert l.zttl('a') == -1