or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/pytest-redis@3.1.x
tile.json

tessl/pypi-pytest-redis

tessl install tessl/pypi-pytest-redis@3.1.0

Redis 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%

task.mdevals/scenario-4/

Redis Configuration Precedence Testing

A test suite that validates configuration precedence in a Redis fixture system.

Capabilities

Configuration Hierarchy Validation

Create a test suite that verifies configuration precedence behavior. The system supports three levels: factory arguments (highest), command-line options (medium), and pytest.ini settings (lowest).

  • A custom Redis fixture configured only via pytest.ini uses port 6380 @test
  • The same fixture with a CLI option --redis-port=6381 uses port 6381 instead @test
  • The same fixture with factory argument port=6382 uses port 6382, ignoring CLI and ini settings @test

Implementation

@generates

Requirements

Create a test file with:

  1. A pytest.ini configuration file that sets redis port to 6380
  2. Three test functions that validate the precedence hierarchy
  3. Custom Redis fixtures created using factory functions that accept configuration parameters
  4. Assertions that verify the correct port is used in each scenario

All tests should pass when configuration precedence works correctly.

API

# test_config.py

def test_pytest_ini_configuration():
    """Test uses port from pytest.ini (6380)."""
    pass

def test_cli_overrides_ini():
    """Test uses port from CLI option (6381), ignoring pytest.ini."""
    pass

def test_factory_args_override_all():
    """Test uses port from factory argument (6382), ignoring CLI and ini."""
    pass

Dependencies { .dependencies }

pytest-redis { .dependency }

Provides Redis fixtures with configurable options at multiple levels including factory arguments, command-line options, and configuration files.

pytest { .dependency }

Test framework that provides the testing infrastructure and fixture system.