mirror of https://github.com/scrapy/scrapy.git
Fix pickle test for pypy
This commit is contained in:
parent
0e382c8160
commit
d472402a02
|
|
@ -166,6 +166,7 @@ flake8-ignore =
|
|||
scrapy/signalmanager.py E501
|
||||
scrapy/spiderloader.py F841 E501 E126
|
||||
scrapy/squeues.py E128
|
||||
scrapy/squeues.py E501
|
||||
scrapy/statscollectors.py E501
|
||||
# tests
|
||||
tests/__init__.py E402 E501
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
import pickle
|
||||
import sys
|
||||
|
||||
from queuelib.tests import test_queue as t
|
||||
from scrapy.squeues import (
|
||||
MarshalFifoDiskQueueNonRequest as MarshalFifoDiskQueue,
|
||||
|
|
@ -108,8 +111,10 @@ class PickleFifoDiskQueueTest(t.FifoDiskQueueTest, FifoDiskQueueTestMixin):
|
|||
try:
|
||||
q.push(lambda x: x)
|
||||
except ValueError as exc:
|
||||
self.assertIsInstance(exc.__context__, AttributeError)
|
||||
|
||||
if hasattr(sys, "pypy_version_info"):
|
||||
self.assertIsInstance(exc.__context__, pickle.PicklingError)
|
||||
else:
|
||||
self.assertIsInstance(exc.__context__, AttributeError)
|
||||
sel = Selector(text='<html><body><p>some text</p></body></html>')
|
||||
try:
|
||||
q.push(sel)
|
||||
|
|
|
|||
Loading…
Reference in New Issue