mirror of https://github.com/scrapy/scrapy.git
Merge pull request #1383 from zoliszeredi/py3/fix_test_utils_defer
Py3/fix test utils defer
This commit is contained in:
commit
c53d6d7460
|
|
@ -45,7 +45,6 @@ tests/test_spidermiddleware_offsite.py
|
|||
tests/test_spidermiddleware_referer.py
|
||||
tests/test_spider.py
|
||||
tests/test_stats.py
|
||||
tests/test_utils_defer.py
|
||||
tests/test_utils_iterators.py
|
||||
tests/test_utils_log.py
|
||||
tests/test_utils_reqser.py
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ from twisted.python.failure import Failure
|
|||
from scrapy.utils.defer import mustbe_deferred, process_chain, \
|
||||
process_chain_both, process_parallel, iter_errback
|
||||
|
||||
from six.moves import xrange
|
||||
|
||||
|
||||
class MustbeDeferredTest(unittest.TestCase):
|
||||
def test_success_function(self):
|
||||
|
|
@ -86,7 +88,7 @@ class IterErrbackTest(unittest.TestCase):
|
|||
|
||||
errors = []
|
||||
out = list(iter_errback(itergood(), errors.append))
|
||||
self.assertEqual(out, range(10))
|
||||
self.assertEqual(out, list(range(10)))
|
||||
self.failIf(errors)
|
||||
|
||||
def test_iter_errback_bad(self):
|
||||
|
|
|
|||
Loading…
Reference in New Issue