Skip to content

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

Added a delay to wait for the proxy to start.

duendexf8dea7494869
diff --git a/scrapy/tests/test_proxy_connect.py b/scrapy/tests/test_proxy_connect.py
index 6d995e8e6..13e8f184d 100644
--- a/scrapy/tests/test_proxy_connect.py
+++ b/scrapy/tests/test_proxy_connect.py
@@ -42,6 +42,8 @@ class ProxyConnectTestCase(TestCase):
self._oldenv = os.environ.copy()
self._proxy = HTTPSProxy(8888)
self._proxy.start()
+ # Wait for the proxy to start.
+ time.sleep(1.0)
os.environ['http_proxy'] = 'http://scrapy:scrapy@localhost:8888'
os.environ['https_proxy'] = 'http://scrapy:scrapy@localhost:8888'