forked from mirror/ledisdb
update test
This commit is contained in:
parent
a985e3ff08
commit
5ce968006c
|
@ -120,18 +120,12 @@ def ledis_ttl(ledis_client, key, k_type):
|
|||
|
||||
def test_ttl():
|
||||
keys, total = scan(rds, 1000)
|
||||
invalid = []
|
||||
for key in keys:
|
||||
k_type = rds.type(key)
|
||||
rds.expire(key, 100)
|
||||
rds.expire(key, (60 * 60 * 24))
|
||||
set_ttl(rds, lds, key, k_type)
|
||||
# if rds.ttl(key) != ledis_ttl(lds, key, k_type):
|
||||
# print key
|
||||
# print rds.ttl(key)
|
||||
# print ledis_ttl(lds, key, k_type)
|
||||
# invalid.append(key)
|
||||
|
||||
assert rds.ttl(key) == ledis_ttl(lds, key, k_type)
|
||||
if rds.ttl(key):
|
||||
assert ledis_ttl(lds, key, k_type) > 0
|
||||
|
||||
if __name__ == "__main__":
|
||||
test()
|
||||
|
|
Loading…
Reference in New Issue