Permalink
Browse files

Added a small script that shows uncovered commands.

  • Loading branch information...
1 parent f182ba6 commit dc9d870045079b3243ebd7229925948a35096a58 @kmerenkov kmerenkov committed May 18, 2010
Showing with 108 additions and 0 deletions.
  1. +108 −0 show_coverage.py
View
@@ -0,0 +1,108 @@
+# -*- coding: utf-8 -*-
+
+REDIS_COMMANDS = ('QUIT',
+ 'AUTH',
+ 'EXISTS',
+ 'DELETE', # come on :-)
+ 'TYPE',
+ 'KEYS',
+ 'RANDOMKEY',
+ 'RENAME',
+ 'RENAMENX',
+ 'DBSIZE',
+ 'EXPIRE',
+ 'TTL',
+ 'SELECT',
+ 'MOVE',
+ 'FLUSHDB',
+ 'FLUSHALL',
+ 'SET',
+ 'GET',
+ 'GETSET',
+ 'MGET',
+ 'SETNX',
+ 'SETEX',
+ 'MSET',
+ 'MSETNX',
+ 'INCR',
+ 'INCRBY',
+ 'DECR',
+ 'DECRBY',
+ 'APPEND',
+ 'SUBSTR',
+ 'RPUSH',
+ 'LPUSH',
+ 'LLEN',
+ 'LRANGE',
+ 'LTRIM',
+ 'LINDEX',
+ 'LSET',
+ 'LREM',
+ 'LPOP',
+ 'RPOP',
+ 'BLPOP',
+ 'BRPOP',
+ 'RPOPLPUSH',
+ 'SADD',
+ 'SREM',
+ 'SPOP',
+ 'SMOVE',
+ 'SCARD',
+ 'SISMEMBER',
+ 'SINTER',
+ 'SINTERSTORE',
+ 'SUNION',
+ 'SUNIONSTORE',
+ 'SDIFF',
+ 'SDIFFSTORE',
+ 'SMEMBERS',
+ 'SRANDMEMBER',
+ 'ZADD',
+ 'ZREM',
+ 'ZINCRBY',
+ 'ZRANK',
+ 'ZREVRANK',
+ 'ZRANGE',
+ 'ZREVRANGE',
+ 'ZRANGEBYSCORE',
+ 'ZCARD',
+ 'ZSCORE',
+ 'ZREMRANGEBYRANK',
+ 'ZREMRANGEBYSCORE',
+ 'ZUNIONSTORE',
+ 'ZINTERSTORE',
+ 'HSET',
+ 'HGET',
+ 'HMSET',
+ 'HINCRBY',
+ 'HEXISTS',
+ 'HDEL',
+ 'HLEN',
+ 'HKEYS',
+ 'HVALS',
+ 'HGETALL',
+ 'SORT',
+ 'SUBSCRIBE',
+ 'UNSUBSCRIBE',
+ 'PUBLISH',
+ 'SAVE',
+ 'BGSAVE',
+ 'LASTSAVE',
+ 'SHUTDOWN',
+ 'BGREWRITEAOF',
+ 'INFO',
+ 'SLAVEOF',
+ 'CONFIG')
+
+from brukva import Client
+
+covered_commands = set(c.upper() for c in dir(Client))
+uncovered_commands = set(REDIS_COMMANDS).difference(covered_commands)
+
+if __name__ == '__main__':
+ if not uncovered_commands:
+ exit(0)
+ print 'Uncovered commmands:'
+ for c in sorted(uncovered_commands):
+ print '\t%s' % c
+ print 'Commands to cover: %d' % len(uncovered_commands)

0 comments on commit dc9d870

Please sign in to comment.