ionelmc / python-redis-lock

Lock context manager implemented via redis SET NX EX and BLPOP.
https://pypi.python.org/pypi/python-redis-lock
BSD 2-Clause "Simplified" License
551 stars 77 forks source link

Remove un-necessary check. #49

Closed ionelmc closed 8 years ago

ionelmc commented 8 years ago

Ref #48.

georgeyk commented 8 years ago

@ionelmc What do you think about remove this check too https://github.com/ionelmc/python-redis-lock/blob/remove-unnecessary-held-check/src/redis_lock/__init__.py#L161 ?

It opens the possibility to use a fake/dummy redis server implementation1 to write unittests without a real redis instance.

ionelmc commented 8 years ago

@georgeyk Hmm, we could remove it. Do you need that removal for your own test suite or something like that?

georgeyk commented 8 years ago

@ionelmc yes, I think fakeredis might work with python-redis-lock.

I'm not testing the lock itself, but the code that is executed with the lock.

codecov-io commented 8 years ago

Current coverage is 92.85%

Merging #49 into master will increase coverage by +1.08%

@@           master     #49   diff @@
=====================================
  Files           2       2          
  Lines         170     168     -2   
  Methods         0       0          
  Branches       26      25     -1   
=====================================
  Hits          156     156          
+ Misses          8       7     -1   
+ Partials        6       5     -1   
  1. File ...dis_lock/__init__.py was modified. more
    • Misses -1
    • Partials -1
    • Hits +2

Sunburst

Powered by Codecov. Last updated by 71a125b

ionelmc commented 8 years ago

@georgeyk ok, check this new change.

georgeyk commented 8 years ago

LGTM :+1: