Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/unit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
import pytest
from pytest_socket import enable_socket, socket_allow_hosts

HOST_ENVIRONMENT_ALLOWLIST: Final = frozenset(
("PATH", "HOME", "USER", "LOGNAME", "TMPDIR", "TEMP", "TMP", "LANG", "LC_ALL", "LC_CTYPE", "TZ", "VIRTUAL_ENV")
)
HOST_ENVIRONMENT_ALLOWED_PREFIXES: Final = ("PYTEST_", "PYTHON", "COV_CORE_", "COVERAGE_")

for _name in tuple(os.environ):
if _name not in HOST_ENVIRONMENT_ALLOWLIST and not _name.startswith(HOST_ENVIRONMENT_ALLOWED_PREFIXES):
del os.environ[_name]
Comment on lines +20 to +22

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Legacy MCP peer setting removed

The mcp-integration CI shard supplies MCP_TEST_PEER_PYTHON to select its separately installed MCP 1.28.1 interpreter. This loop deletes that setting, so the MCP e2e test falls back to sys.executable and starts the peer with the suite’s MCP 2.2.0 environment. The shard no longer tests the intended legacy-peer compatibility and may fail against the wrong SDK.

Comment on lines +20 to +22

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Audio test opt-out removed

If a runner sets SKIP_AUDIO_TESTS=true because soundfile is unavailable, this loop removes the setting before the audio test’s skip condition is evaluated. The test then runs instead of being skipped and can fail because the dependency is missing.

os.environ["PYTHON_DOTENV_DISABLED"] = "1"
os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"

import litellm # noqa: E402 # litellm reads LITELLM_LOCAL_MODEL_COST_MAP at import
Expand Down
Loading