Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions tests/unit/crawlers/_playwright/test_playwright_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,10 +725,7 @@ async def test_respect_robots_txt_with_problematic_links(server_url: URL) -> Non
"""Test checks the crawler behavior with links that may cause problems when attempting to retrieve robots.txt."""
visit = mock.Mock()
fail = mock.Mock()
crawler = PlaywrightCrawler(
respect_robots_txt_file=True,
max_request_retries=0,
)
crawler = PlaywrightCrawler(respect_robots_txt_file=True)

@crawler.router.default_handler
async def request_handler(context: PlaywrightCrawlingContext) -> None:
Expand Down Expand Up @@ -1044,10 +1041,7 @@ async def test_navigation_timeout_applies_to_hooks(server_url: URL) -> None:


async def test_slow_navigation_does_not_count_toward_handler_timeout(server_url: URL) -> None:
crawler = PlaywrightCrawler(
request_handler_timeout=timedelta(seconds=0.5),
max_request_retries=0,
)
crawler = PlaywrightCrawler(request_handler_timeout=timedelta(seconds=0.5))

request_handler = AsyncMock()
crawler.router.default_handler(request_handler)
Expand Down
Loading