import subprocess


def run_tests(output_file: str = "test_durations.log"):
    """Run tests and log their durations."""
    command = [
        "pytest",
        "tests/",
        "--durations=0",
        "--durations-min=0",
        "--tb=short",
        "--disable-warnings",
        "-q",
        "-m",
        "not slow",
    ]
    with open(output_file, "w") as f:
        subprocess.run(command, stdout=f, check=True)
