@@ -84,7 +84,9 @@ def __init__(self, response: _Response):
8484
8585
8686def test_scrape_tool_wraps_response_data_read_failures ():
87- client = _SyncScrapeClient (_Response (data_error = RuntimeError ("broken response data" )))
87+ client = _SyncScrapeClient (
88+ _Response (data_error = RuntimeError ("broken response data" ))
89+ )
8890
8991 with pytest .raises (
9092 HyperbrowserError , match = "Failed to read scrape tool response data"
@@ -111,7 +113,8 @@ def test_scrape_tool_rejects_non_string_markdown_field():
111113 client = _SyncScrapeClient (_Response (data = SimpleNamespace (markdown = 123 )))
112114
113115 with pytest .raises (
114- HyperbrowserError , match = "scrape tool response field 'markdown' must be a string"
116+ HyperbrowserError ,
117+ match = "scrape tool response field 'markdown' must be a string" ,
115118 ):
116119 WebsiteScrapeTool .runnable (client , {"url" : "https://example.com" })
117120
@@ -129,7 +132,9 @@ def test_screenshot_tool_rejects_non_string_screenshot_field():
129132def test_crawl_tool_rejects_non_list_response_data ():
130133 client = _SyncCrawlClient (_Response (data = {"invalid" : "payload" }))
131134
132- with pytest .raises (HyperbrowserError , match = "crawl tool response data must be a list" ):
135+ with pytest .raises (
136+ HyperbrowserError , match = "crawl tool response data must be a list"
137+ ):
133138 WebsiteCrawlTool .runnable (client , {"url" : "https://example.com" })
134139
135140
@@ -151,7 +156,9 @@ def markdown(self) -> str:
151156
152157
153158def test_crawl_tool_rejects_non_string_page_urls ():
154- client = _SyncCrawlClient (_Response (data = [SimpleNamespace (url = 42 , markdown = "body" )]))
159+ client = _SyncCrawlClient (
160+ _Response (data = [SimpleNamespace (url = 42 , markdown = "body" )])
161+ )
155162
156163 with pytest .raises (
157164 HyperbrowserError ,
0 commit comments