Test chat bots, voice assistants, and IVR menus with pytest using a small Conversation object and a callable bot adapter. Use when the user wants to write rule-based assertions over multi-turn dialogue without bringing in an LLM dependency, when they have a chatbot reachable as a Python callable or HTTP webhook, when they need to keep per-conversation state across turns and assert on slot filling, when they want pytest-native fixtures and a printable transcript on failure, or when they mention voice-assistant testing, IVR menu testing, conversational AI testing, LLM bot testing (used as the target under test, not as the matcher), expect matchers for bot replies, or multi-turn dialogue tests.
99
100%
Does it follow best practices?
Impact
97%
1.56xAverage score across 3 eval scenarios
Passed
No known issues
"""Built-in bot adapters.
The HTTP webhook adapter depends on the optional ``[http]`` extra
(``httpx``). The base install must not fail when ``httpx`` is missing,
so the import is wrapped: when ``httpx`` is unavailable, a stub
``http_webhook`` callable replaces the real adapter and raises a
helpful ImportError only when the user actually tries to use it.
"""
from __future__ import annotations
__all__ = ["http_webhook"]
try:
from pytest_conversational.adapters.http_webhook import (
http_webhook as http_webhook,
)
except ImportError as _http_webhook_import_error:
_error = _http_webhook_import_error
def http_webhook(*args, **kwargs):
raise ImportError(
"http_webhook requires the optional 'httpx' dependency. "
"Install with: pip install pytest-conversational[http]"
) from _error.tessl-plugin
evals
src
pytest_conversational
tests