tessl install tessl/pypi-pytest-redis@3.1.0Redis fixtures and fixture factories for Pytest.
Agent Success
Agent success rate when using this tile
95%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.12x
Baseline
Agent success rate without this tile
85%
Create a custom Redis test fixture with specific data persistence settings for testing a data-critical application that requires periodic snapshots.
Build a custom Redis fixture that configures data persistence with the following settings:
Save Configuration: Configure Redis to save snapshots with these rules:
RDB Settings: Enable both RDB compression and checksum validation for data integrity
Custom Data Directory: Use a custom temporary data directory named redis_persist_data within the system temp folder
Port Configuration: Configure the Redis instance to run on port 6380
Test Integration: Create a fixture that provides a Redis client connected to this configured instance
Create two files:
conftest.py - Contains the custom fixture definitionstest_persistence.py - Contains tests demonstrating the fixture works correctlyYour implementation should pass these test cases:
@generates
# Custom Redis process fixture with persistence configuration
# Returns a Redis process executor running on port 6380
def redis_persist_proc():
pass
# Custom Redis client fixture connected to redis_persist_proc
# Returns a redis.Redis client instance
def redis_persist_client():
passProvides Redis fixtures and fixture factories for pytest with persistence configuration support.