test: interaction-model end-to-end suite with a requirements manifest (#2691)
This commit is contained in:
parent
3eb579948a
commit
24725633f1
1 changed files with 14355 additions and 121 deletions
23
tests/interaction/conftest.py
Normal file
23
tests/interaction/conftest.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
"""Shared fixtures for the interaction suite."""
|
||||
|
||||
import pytest
|
||||
|
||||
from tests.interaction._connect import Connect, connect_in_memory, connect_over_sse, connect_over_streamable_http
|
||||
|
||||
_FACTORIES: dict[str, Connect] = {
|
||||
"in-memory": connect_in_memory,
|
||||
"streamable-http": connect_over_streamable_http,
|
||||
"sse": connect_over_sse,
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture(params=sorted(_FACTORIES))
|
||||
def connect(request: pytest.FixtureRequest) -> Connect:
|
||||
"""The transport-parametrized connection factory: a test using it runs once per transport.
|
||||
|
||||
Tests that are tied to one transport (the wire-recording tests, the bare-ClientSession tests,
|
||||
the transport-specific tests under transports/) do not use this fixture and connect directly.
|
||||
"""
|
||||
transport_name = request.param
|
||||
assert isinstance(transport_name, str)
|
||||
return _FACTORIES[transport_name]
|
||||
Loading…
Reference in a new issue