INNER CODE UNIT · Python

tests

JasperSui/fastapi-injectable · noxfile.py:124

def tests(session: nox.Session) -> None:
    """Run the test suite."""
    session.install(".")
    session.install("coverage[toml]", "pytest", "pytest-asyncio", "httpx", "celery", "dramatiq")
    # temporalio bundles a native Rust extension, and mypy ships mypyc-compiled wheels;
    # neither targets free-threaded Python. Skip both on those interpreters -- the temporal
    # tests and test_mypy_plugin each use pytest.importorskip() to skip gracefully.
    is_free_threaded = isinstance(session.python, str) and session.python.endswith("t")
    if not is_free_threaded:
        session.install("temporalio", "mypy")
    try:
        session.run("coverage", "run", "--parallel-mode", "-m", "pytest", *session.posargs)
    finally:
        if session.interactive:
            session.notify("coverage", posargs=[])


@nox.session(python=latest_python_version)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…