Skip to content

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

Update test for unpickable objects

Eugenio Lacuestae4558cb27e8e
diff --git a/tests/test_squeues.py b/tests/test_squeues.py
index d2f721241..3ded5c027 100644
--- a/tests/test_squeues.py
+++ b/tests/test_squeues.py
@@ -1,4 +1,3 @@
-from sys import version_info
import pickle
from queuelib.tests import test_queue as t
@@ -32,10 +31,9 @@ def nonserializable_object_test(self):
a = A()
a.__reduce__ = a.__reduce_ex__ = None
self.assertRaises(ValueError, q.push, a)
- if version_info.major == 3 and version_info.minor >= 6:
- # Selectors should fail (lxml.html.HtmlElement objects can't be pickled)
- sel = Selector(text='<html><body><p>some text</p></body></html>')
- self.assertRaises(ValueError, q.push, sel)
+ # Selectors should fail (lxml.html.HtmlElement objects can't be pickled)
+ sel = Selector(text='<html><body><p>some text</p></body></html>')
+ self.assertRaises(ValueError, q.push, sel)
class MarshalFifoDiskQueueTest(t.FifoDiskQueueTest):