INNER CODE UNIT · Python
tests
redis/fastapi-redis-sdk · noxfile.py:91
def tests(session: nox.Session) -> None:
"""Run the full test suite with coverage."""
uv_sync(session, "--extra", "otel", "--no-default-groups", "--group", "test")
# posargs replace the default path so `nox -s tests-3.12 -- tests/unit`
# narrows the run instead of silently collecting everything. Note this
# session keeps the full-suite 80% gate, so narrowing it will usually trip
# --cov-fail-under; use tests_unit / tests_integration to select a suite.
session.run("pytest", *(session.posargs or ["tests/"]), "-v")
@nox.session(python=PYTHON_VERSIONS, default=False)
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)