This commit is contained in:
Florian Bruhin 2018-09-09 17:59:18 +02:00
parent b96898db37
commit b4077a8543
3 changed files with 3 additions and 4 deletions

View File

@ -778,7 +778,7 @@ class AbstractDownloadItem(QObject):
elif isinstance(target, PDFJSDownloadTarget):
self.finished.connect(self._pdfjs_if_successful)
else:
assert False, target
raise utils.Unreachable
self._set_tempfile(fobj)
else: # pragma: no cover

View File

@ -27,7 +27,6 @@ from PyQt5.QtCore import QUrl, QUrlQuery
from qutebrowser.utils import utils, javascript, jinja, qtutils, usertypes
from qutebrowser.misc import objects
from qutebrowser.config import config
from qutebrowser.browser import downloads
class PDFJSNotFound(Exception):

View File

@ -22,7 +22,7 @@ import os
import time
import logging
import py.path
import py.path # pylint: disable=no-name-in-module
from PyQt5.QtCore import QUrl
import pytest
@ -189,7 +189,7 @@ class TestPDFJSHandler:
@pytest.fixture
def download_tmpdir(self):
tdir = downloads.temp_download_manager.get_tmpdir()
yield py.path.local(tdir.name)
yield py.path.local(tdir.name) # pylint: disable=no-member
tdir.cleanup()
def test_existing_resource(self):