Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Re-enable tests with DirtyReactorAggregateError comments. (#8073)

Andrey Rakhmatullin6ed70e82836b
diff --git a/tests/test_downloader_handler_twisted_ftp.py b/tests/test_downloader_handler_twisted_ftp.py
index 28a067fb7..7b1c0de40 100644
--- a/tests/test_downloader_handler_twisted_ftp.py
+++ b/tests/test_downloader_handler_twisted_ftp.py
@@ -1,7 +1,6 @@
from __future__ import annotations
import os
-import sys
from abc import ABC, abstractmethod
from pathlib import Path
from tempfile import mkstemp
@@ -171,13 +170,8 @@ class TestFTP(TestFTPBase):
@deferred_f_from_coro_f
async def test_invalid_credentials(
- self, server_url: str, dh: FTPDownloadHandler, reactor_pytest: str
+ self, server_url: str, dh: FTPDownloadHandler
) -> None:
- if reactor_pytest == "asyncio" and sys.platform == "win32":
- pytest.skip(
- "This test produces DirtyReactorAggregateError on Windows with asyncio"
- )
-
from twisted.protocols.ftp import ConnectionLost
meta = dict(self.req_meta)
diff --git a/tests/utils/bases/download_handlers_http.py b/tests/utils/bases/download_handlers_http.py
index a2d1d343b..2529848b3 100644
--- a/tests/utils/bases/download_handlers_http.py
+++ b/tests/utils/bases/download_handlers_http.py
@@ -360,14 +360,8 @@ class TestHttpBase(ABC):
@coroutine_test
async def test_timeout_download_from_spider_nodata_rcvd(
- self, mockserver: MockServer, reactor_pytest: str
+ self, mockserver: MockServer
) -> None:
- if reactor_pytest == "asyncio" and sys.platform == "win32":
- # https://twistedmatrix.com/trac/ticket/10279
- pytest.skip(
- "This test produces DirtyReactorAggregateError on Windows with asyncio"
- )
-
# client connects but no data is received
meta = {"download_timeout": 0.5}
request = Request(mockserver.url("/wait", is_secure=self.is_secure), meta=meta)
@@ -378,13 +372,8 @@ class TestHttpBase(ABC):
@coroutine_test
async def test_timeout_download_from_spider_server_hangs(
- self, mockserver: MockServer, reactor_pytest: str
+ self, mockserver: MockServer
) -> None:
- if reactor_pytest == "asyncio" and sys.platform == "win32":
- # https://twistedmatrix.com/trac/ticket/10279
- pytest.skip(
- "This test produces DirtyReactorAggregateError on Windows with asyncio"
- )
# client connects, server send headers and some body bytes but hangs
meta = {"download_timeout": 0.5}
request = Request(