-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flesh out RedisDeque() code and tests (#36)
* Run (slow) doctests on only CI Make it faster/easier/cheaper to run through the entire unit test suite while writing/debugging code locally. * Implement sane RedisList.__eq__() * Fix ResourceWarning lunacy * Implement various RedisDeque methods - `RedisDeque.append()` - `RedisDeque.appendleft()` - `RedisDeque.pop()` - `RedisDeque.popleft()` * Defensively import tests.base.run_doctests() Before, I was naively `from tests.base import run_doctests`. This worked fine against source, but broke against the released package. * Redis watch both self/other keys during __eq__() Ensure that neither self nor other changes during an equality comparison. If either changes, then (implicitly) raise a WatchError. * Factor out deceptive method name `RedisList.__eq__()` looks recursive, but it isn't, because a slice of a `RedisList` is a normal Python list (not a `RedisList`). * Make equality testing safer Explicitly avoid evaluating: - `[]` as equal to `{}`, and - `[0, 1]` as equal to `{0: 0, 1: 1}` Also more cleanly separate mixin classes by behavior. * Implement RedisDeque.rotate() * Consistently name Python values vs. JSON values * Remove gratuitous use of @Property * More elegantly import tests.base.run_doctests() * Bump version number
- Loading branch information
Showing
19 changed files
with
340 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.