mirror of
https://github.com/hwchase17/langchain.git
synced 2026-07-01 14:47:02 +00:00
hotfix(openai): skip Codex live integration tests in CI (#38124)
This commit is contained in:
@@ -15,6 +15,7 @@ leaves non-Codex tests in the directory untouched.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from typing import Any
|
||||
|
||||
@@ -61,6 +62,17 @@ def _vcr_record_mode(config: pytest.Config) -> str | None:
|
||||
return None
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _skip_codex_live_ci(request: pytest.FixtureRequest) -> None:
|
||||
"""Skip Codex tests in CI unless they are replaying VCR cassettes."""
|
||||
if "codex" not in request.module.__name__:
|
||||
return
|
||||
if _vcr_record_mode(request.config) == "none":
|
||||
return
|
||||
if os.getenv("CI"):
|
||||
pytest.skip("Codex tests require VCR playback in CI.")
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _fake_codex_oauth_token(
|
||||
request: pytest.FixtureRequest, monkeypatch: pytest.MonkeyPatch
|
||||
|
||||
Reference in New Issue
Block a user