Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions tests/unit/_autoscaling/test_autoscaled_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import annotations

import asyncio
import sys
from contextlib import suppress
from datetime import datetime, timedelta, timezone
from itertools import chain, repeat
Expand Down Expand Up @@ -144,6 +145,10 @@ async def run() -> None:
await pool.run()


@pytest.mark.skipif(
sys.platform != 'linux',
reason='Test is flaky on Windows and MacOS, see https://github.com/apify/crawlee-python/issues/1655.',
)
async def test_autoscales(
monkeypatch: pytest.MonkeyPatch,
system_status: SystemStatus | Mock,
Expand Down
5 changes: 5 additions & 0 deletions tests/unit/browsers/test_browser_pool.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import sys
from typing import TYPE_CHECKING

import pytest
Expand Down Expand Up @@ -62,6 +63,10 @@ async def test_multiple_plugins_new_page_creation(server_url: URL) -> None:
assert browser_pool.total_pages_count == 3


@pytest.mark.skipif(
sys.platform != 'linux',
reason='Test is flaky on Windows and MacOS, see https://github.com/apify/crawlee-python/issues/1660.',
)
async def test_new_page_with_each_plugin(server_url: URL) -> None:
plugin_chromium = PlaywrightBrowserPlugin(browser_type='chromium')
plugin_firefox = PlaywrightBrowserPlugin(browser_type='firefox')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import asyncio
import logging
import sys
from dataclasses import dataclass
from datetime import timedelta
from itertools import cycle
Expand Down Expand Up @@ -604,6 +605,10 @@ async def request_handler(context: AdaptivePlaywrightCrawlingContext) -> None:
mocked_h2_handler.assert_has_calls([call(expected_h2_tag)])


@pytest.mark.skipif(
sys.platform != 'linux',
reason='Test is flaky on Windows and MacOS, see https://github.com/apify/crawlee-python/issues/1650.',
)
async def test_adaptive_context_query_selector_parsel(test_urls: list[str]) -> None:
"""Test that `context.query_selector_one` works regardless of the crawl type for Parsel variant.

Expand Down
8 changes: 8 additions & 0 deletions tests/unit/crawlers/_basic/test_basic_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,10 @@ async def handler(context: BasicCrawlingContext) -> None:


@pytest.mark.run_alone
@pytest.mark.skipif(
sys.platform != 'linux',
reason='Test is flaky on Windows and MacOS, see https://github.com/apify/crawlee-python/issues/1652.',
)
@pytest.mark.skipif(sys.version_info[:3] < (3, 11), reason='asyncio.timeout was introduced in Python 3.11.')
@pytest.mark.parametrize(
'sleep_type',
Expand Down Expand Up @@ -1351,6 +1355,10 @@ async def handler(context: BasicCrawlingContext) -> None:
assert mocked_handler_after_sleep.call_count == 1


@pytest.mark.skipif(
sys.platform != 'linux',
reason='Test is flaky on Windows and MacOS, see https://github.com/apify/crawlee-python/issues/1649.',
)
@pytest.mark.parametrize(
('keep_alive', 'max_requests_per_crawl', 'expected_handled_requests_count'),
[
Expand Down
5 changes: 5 additions & 0 deletions tests/unit/crawlers/_playwright/test_playwright_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import asyncio
import json
import logging
import sys
from datetime import timedelta
from typing import TYPE_CHECKING, Any, Literal
from unittest import mock
Expand Down Expand Up @@ -325,6 +326,10 @@ async def some_hook(context: PlaywrightPreNavCrawlingContext) -> None:
assert handler_data.get('proxy') == proxy_value


@pytest.mark.skipif(
sys.platform != 'linux',
reason='Test is flaky on Windows and MacOS, see https://github.com/apify/crawlee-python/issues/1651.',
)
@pytest.mark.parametrize(
'use_incognito_pages',
[
Expand Down
Loading