diff --git a/backend/tests/e2e/test_api_contracts.py b/backend/tests/e2e/test_api_contracts.py index 7a4b922..50af111 100644 --- a/backend/tests/e2e/test_api_contracts.py +++ b/backend/tests/e2e/test_api_contracts.py @@ -27,13 +27,16 @@ except ImportError: pytestmark = [ pytest.mark.e2e, pytest.mark.schemathesis, - pytest.mark.skipif( - not SCHEMATHESIS_AVAILABLE, - reason="schemathesis not installed - run: make install-e2e", - ), ] +if not SCHEMATHESIS_AVAILABLE: + + def test_schemathesis_compatibility(): + """Gracefully handle missing schemathesis dependency.""" + pytest.skip("schemathesis not installed - run: make install-e2e") + + if SCHEMATHESIS_AVAILABLE: from app.main import app