[test_downloadermiddleware_httpcache] Trying hack to handle systemerror whjen importing leveldb

https://github.com/scrapy/scrapy/issues/4085
This commit is contained in:
Roy 2019-10-27 18:02:13 +00:00
parent deacd34c8d
commit 11942c436c
1 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import unittest
import email.utils
from contextlib import contextmanager
import pytest
import sys
from scrapy.http import Response, HtmlResponse, Request
from scrapy.spiders import Spider
@ -157,7 +158,10 @@ class FilesystemStorageGzipTest(FilesystemStorageTest):
class LeveldbStorageTest(DefaultStorageTest):
pytest.importorskip('leveldb')
try:
pytest.importorskip('leveldb')
except SystemError:
pass
storage_class = 'scrapy.extensions.httpcache.LeveldbCacheStorage'