Fix cache tests on Qt 5.8
This commit is contained in:
parent
1b0ea19ca4
commit
b6642e66fa
@ -54,7 +54,7 @@ class DiskCache(QNetworkDiskCache):
|
||||
if size is None:
|
||||
size = 1024 * 1024 * 50 # default from QNetworkDiskCachePrivate
|
||||
# WORKAROUND for https://github.com/qutebrowser/qutebrowser/issues/2427
|
||||
if qtutils.version_check('5.8', exact=True):
|
||||
if qtutils.version_check('5.8', exact=True): # pragma: no cover
|
||||
size = 0
|
||||
self.setMaximumCacheSize(size)
|
||||
|
||||
|
@ -17,10 +17,16 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import pytest
|
||||
from PyQt5.QtCore import QUrl, QDateTime
|
||||
from PyQt5.QtNetwork import QNetworkDiskCache, QNetworkCacheMetaData
|
||||
|
||||
from qutebrowser.browser.webkit import cache
|
||||
from qutebrowser.utils import qtutils
|
||||
|
||||
|
||||
pytestmark = pytest.mark.skipif(qtutils.version_check('5.8', exact=True),
|
||||
reason="QNetworkDiskCache is broken on Qt 5.8")
|
||||
|
||||
|
||||
def preload_cache(cache, url='http://www.example.com/', content=b'foobar'):
|
||||
|
Loading…
Reference in New Issue
Block a user