Skip to content

Commit 869f955

Browse files
committed
TST Python 2.x fix
1 parent 0e5e489 commit 869f955

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
import pytest
44
from pytest_twisted import inlineCallbacks
5+
from twisted.internet.defer import returnValue
56
from twisted.web.resource import Resource
67
from scrapy.crawler import CrawlerRunner
78
from scrapy.utils.python import to_bytes
@@ -38,7 +39,8 @@ def crawl_items(spider_cls, resource_cls, settings, spider_kwargs=None):
3839
with MockServer(resource_cls) as s:
3940
root_url = s.root_url
4041
yield crawler.crawl(url=root_url, **spider_kwargs)
41-
return crawler.spider.collected_items, s.root_url, crawler
42+
result = crawler.spider.collected_items, s.root_url, crawler
43+
returnValue(result)
4244

4345

4446
def make_crawler(spider_cls, settings):

0 commit comments

Comments
 (0)