Scrapy, a fast high-level web crawling & scraping framework for Python.
[test_downloadermiddleware_httpcache] Trying hack to handle systemerror whjen importing leveldb https://github.com/scrapy/scrapy/issues/4085
Roy11942c436c78
diff --git a/tests/test_downloadermiddleware_httpcache.py b/tests/test_downloadermiddleware_httpcache.pyindex e350da72c..eec0feafc 100644--- a/tests/test_downloadermiddleware_httpcache.py+++ b/tests/test_downloadermiddleware_httpcache.py@@ -6,6 +6,7 @@ import unittestimport email.utilsfrom contextlib import contextmanagerimport pytest+import sysfrom scrapy.http import Response, HtmlResponse, Requestfrom scrapy.spiders import Spider@@ -157,7 +158,10 @@ class FilesystemStorageGzipTest(FilesystemStorageTest):class LeveldbStorageTest(DefaultStorageTest):- pytest.importorskip('leveldb')+ try:+ pytest.importorskip('leveldb')+ except SystemError:+ passstorage_class = 'scrapy.extensions.httpcache.LeveldbCacheStorage'