The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test(integration): tidy xdist collection bookkeeping
kerrya15b0fa6d230
diff --git a/tests/integration/conftest.py b/tests/integration/conftest.pyindex f66ff7e74df..c54197c15e6 100644--- a/tests/integration/conftest.py+++ b/tests/integration/conftest.py@@ -1,21 +1,20 @@from __future__ import annotations-import jsonimport hashlib+import jsonimport os-from collections.abc import Sequence-from collections.abc import Iterator+from collections.abc import Iterator, Sequencefrom importlib.metadata import versionfrom pathlib import Pathfrom typing import Final-import pytestimport httpx+import pytestfrom redis import Redisfrom tests.integration._support.client import Gateway, eventually, gateway_from_environment-from tests.integration._support.manifest import OWNED_DIRECTORIES, contractsfrom tests.integration._support.generation import LIFECYCLE_SETTINGS+from tests.integration._support.manifest import OWNED_DIRECTORIES, contractsCOLLECTED: Final = pytest.StashKey[tuple[str, ...]]()REPORTS: Final = pytest.StashKey[list[pytest.TestReport]]()@@ -41,14 +40,12 @@ class IntegrationReportPlugin:@pytest.hookimpl(optionalhook=True)def pytest_xdist_node_collection_finished(self, node: object, ids: Sequence[str]) -> None:- owned_prefix: Final = "tests/integration/"- self.config.stash[COLLECTED] = tuple(- nodeid- for nodeid in ids- if nodeid.split("::", 1)[0].startswith(owned_prefix)- and len(Path(nodeid.split("::", 1)[0]).parts) > 2- and Path(nodeid.split("::", 1)[0]).parts[2] in OWNED_DIRECTORIES- )+ self.config.stash[COLLECTED] = tuple(nodeid for nodeid in ids if _owned(nodeid))+++def _owned(nodeid: str) -> bool:+ parts: Final = Path(nodeid.split("::", 1)[0]).parts+ return parts[:2] == ("tests", "integration") and len(parts) > 3 and parts[2] in OWNED_DIRECTORIESdef pytest_collection_modifyitems(config: pytest.Config, items: list[pytest.Item]) -> None: