Skip to content

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

increase delay in test to avoid small time differences

Daniel Graña06b9702984ad
diff --git a/scrapy/tests/test_crawl.py b/scrapy/tests/test_crawl.py
index 5b3b8a0e2..256f2d9b1 100644
--- a/scrapy/tests/test_crawl.py
+++ b/scrapy/tests/test_crawl.py
@@ -29,10 +29,10 @@ class CrawlTestCase(TestCase):
@defer.inlineCallbacks
def test_delay(self):
spider = FollowAllSpider()
- yield docrawl(spider, {"DOWNLOAD_DELAY": 0.3})
+ yield docrawl(spider, {"DOWNLOAD_DELAY": 1})
t = spider.times[0]
for t2 in spider.times[1:]:
- self.assertTrue(t2-t > 0.15, "download delay too small: %s" % (t2-t))
+ self.assertTrue(t2-t > 0.45, "download delay too small: %s" % (t2-t))
t = t2
@defer.inlineCallbacks