Skip to content

Commit 1591984

Browse files
committed
Focus only onthe single flaky test
1 parent 7771658 commit 1591984

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type-check:
3131

3232
unit-tests:
3333
uv run pytest --numprocesses=1 -vv tests/unit -m "run_alone"
34-
uv run pytest --numprocesses=auto -vv tests/unit -m "not run_alone"
34+
#uv run pytest --numprocesses=auto -vv tests/unit -m "not run_alone"
3535

3636
unit-tests-cov:
3737
uv run pytest --numprocesses=1 -vv --cov=src/crawlee tests/unit -m "run_alone"

src/crawlee/crawlers/_basic/_basic_crawler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,6 @@ async def __is_finished_function(self) -> bool:
13571357
is_finished = await request_manager.is_finished()
13581358
if is_finished:
13591359
self.log.info('I am sure this is a lie!!!')
1360-
self.log.info(self._request_manager._client._state._state)
13611360
return is_finished
13621361

13631362
async def __is_task_ready_function(self) -> bool:

tests/unit/crawlers/_basic/test_basic_crawler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,7 @@ async def handler(context: BasicCrawlingContext) -> None:
12711271
await store.persist_autosaved_values()
12721272
assert (await store.get_value(BasicCrawler._CRAWLEE_STATE_KEY))['counter'] == 2
12731273

1274-
1274+
@pytest.mark.parametrize("_", range(10))
12751275
@pytest.mark.run_alone
12761276
@pytest.mark.skipif(sys.version_info[:3] < (3, 11), reason='asyncio.timeout was introduced in Python 3.11.')
12771277
@pytest.mark.parametrize(
@@ -1281,7 +1281,7 @@ async def handler(context: BasicCrawlingContext) -> None:
12811281
pytest.param('sync_sleep', marks=pytest.mark.skip(reason='https://github.com/apify/crawlee-python/issues/908')),
12821282
],
12831283
)
1284-
async def test_timeout_in_handler(sleep_type: str) -> None:
1284+
async def test_timeout_in_handler(sleep_type: str, _) -> None:
12851285
"""Test that timeout from request handler is treated the same way as exception thrown in request handler.
12861286
12871287
Handler should be able to time out even if the code causing the timeout is blocking sync code.

0 commit comments

Comments
 (0)