MCPcopy Create free account
hub / github.com/ScrapeGraphAI/Scrapegraph-ai / assert_response_time_acceptable

Function assert_response_time_acceptable

tests/fixtures/helpers.py:47–56  ·  view source on GitHub ↗

Assert that response time is within acceptable limits. Args: execution_time: Actual execution time in seconds max_time: Maximum acceptable time in seconds

(execution_time: float, max_time: float = 30.0)

Source from the content-addressed store, hash-verified

45
46
47def assert_response_time_acceptable(execution_time: float, max_time: float = 30.0):
48 """Assert that response time is within acceptable limits.
49
50 Args:
51 execution_time: Actual execution time in seconds
52 max_time: Maximum acceptable time in seconds
53 """
54 assert (
55 execution_time <= max_time
56 ), f"Execution time {execution_time}s exceeded maximum {max_time}s"
57
58
59def assert_no_errors_in_result(result: Union[Dict, str]):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected