• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zincware / ZnSocket / 20220197954 / 2
72%
main: 72%

Build:
DEFAULT BRANCH: main
Ran 15 Dec 2025 04:20AM UTC
Files 14
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Dec 2025 06:36AM UTC coverage: 71.634% (+6.8%) from 64.824%
20220197954.2

push

github

web-flow
Feature/improve-memory-storage (#116)

* introduce memory storage

* rename storage class

* Add Redis-compatible sorted sets, expiry, and scan to MemoryStorage

Implements missing Redis operations needed for zndraw application:

- Sorted set operations: zadd, zcard, zrange, zrangebyscore,
  zrevrangebyscore, zrem, zcount with O(log n) performance using
  sortedcontainers.SortedList
- Expiry/TTL support: setex, expire with lazy cleanup on access
- Key scanning: scan_iter with glob pattern matching
- Enhanced thread safety with expiry checks on all read operations
- Pipeline support matching redis-py behavior

All 80 tests pass against both MemoryStorage and Redis to ensure
exact API compatibility. MemoryStorage now serves as a drop-in
replacement for Redis in single-process scenarios.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Enhance MemoryStorage with full Redis-py API compatibility

Add comprehensive Redis-compatible features to MemoryStorage to ensure
exact API parity with redis-py for improved testing and development.

Key enhancements:
- Add nx, xx, ex parameters to set() method for conditional sets and expiration
- Implement incr() and decr() methods for atomic counter operations
- Add count parameter to scan_iter() for result limiting
- Fix hgetall() to return independent copies instead of internal references
- Add _encode_value() method with strict type validation matching Redis

Type validation now exactly matches Redis behavior:
- Accept: str, bytes, int, float (converting numbers to strings)
- Reject: bool, dict, list, and other types with DataError

Test coverage:
- 131 total tests (previously 88)
- All tests pass for both MemoryStorage and redisclient
- Added tests for JSON string handling, type validation, and edge cases
- Verified exact behavioral compatibility with Redis

This ensures MemoryStorage can be used as a drop-in replacement for
Redis during testing with... (continued)

1394 of 1946 relevant lines covered (71.63%)

0.72 hits per line

Source Files on job 20220197954.2
  • Tree
  • List 14
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 20220197954
  • 69003823 on github
  • Prev Job for on main (#16408338322.2)
  • Next Job for on main (#20421496155.4)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc