INNER CODE UNIT · Python
tests_unit
redis/fastapi-redis-sdk · noxfile.py:102
def tests_unit(session: nox.Session) -> None:
"""Run the fakeredis-backed unit suite. Needs no Redis server."""
uv_sync(session, "--extra", "otel", "--no-default-groups", "--group", "test")
session.run("pytest", "tests/unit", *session.posargs)
@nox.session(python=PYTHON_VERSIONS, default=False)
def tests_integration(session: nox.Session) -> None:
"""Run the integration suite against a real Redis server on localhost:6379.
Tests are marked ``@requires_redis`` and skip when no server is reachable.
That cannot pass vacuously: with all of them skipped coverage drops to
~35% and the floor below fails the session, so a missing server surfaces
as a failure rather than a green all-skipped run.
"""
uv_sync(session, "--extra", "otel", "--no-default-groups", "--group", "test")
session.run(
"pytest",