feat(test): add test-schema target and SCHEMA_QUICK=1 mode for schemathesis

- Add dedicated test-schema Makefile target (xdist logical, 600s timeout,
  -m fuzz) so schemathesis runs separately from test-fuzz, which was
  spinning up competing uvicorn workers per xdist process
- Exclude all test_schemathesis*.py files from FUZZ_FLAGS via --ignore
- Add schema to _ALL_SUITES between api and fuzz
- Add SCHEMA_QUICK env var (default 0): caps every max_examples to 100
  across all four schemathesis files (4520 -> 600 total examples)
- Fix pre-push hook: use .311 venv and delegate to make test-all FAIL_FAST=0
  instead of hand-rolling five separate pytest invocations
This commit is contained in:
2026-05-16 18:25:40 -04:00
parent ac332a6ba9
commit 0fe9f895d0
5 changed files with 36 additions and 10 deletions

View File

@@ -24,7 +24,10 @@ Routes covered (all decorated ``tags=["TTP Tagging"]``):
"""
from __future__ import annotations
import os
import pytest
_QUICK = os.getenv("SCHEMA_QUICK") == "1"
import schemathesis as st
from hypothesis import HealthCheck, Verbosity, settings
@@ -46,7 +49,7 @@ TTP_SCHEMA = st.openapi.from_url(
@pytest.mark.fuzz
@TTP_SCHEMA.parametrize()
@settings(
max_examples=400,
max_examples=100 if _QUICK else 400,
deadline=None,
verbosity=Verbosity.normal,
suppress_health_check=[
@@ -63,7 +66,7 @@ def test_ttp_schema_compliance(case):
@pytest.mark.fuzz
@TTP_SCHEMA.parametrize()
@settings(
max_examples=120,
max_examples=100 if _QUICK else 120,
deadline=None,
verbosity=Verbosity.normal,
suppress_health_check=[