Fix test_history.test_init without QtWebKIt

This commit is contained in:
Florian Bruhin 2017-02-08 17:04:14 +01:00
parent 16ecc043f7
commit 601110761d

View File

@ -383,8 +383,10 @@ def test_history_interface(qtbot, webview, hist_interface):
@pytest.mark.parametrize('backend', [usertypes.Backend.QtWebEngine,
usertypes.Backend.QtWebKit])
def test_init(backend, qapp, tmpdir, monkeypatch, fake_save_manager):
if backend == 'webkit':
if backend == usertypes.Backend.QtWebKit:
pytest.importorskip('PyQt5.QtWebKitWidgets')
else:
assert backend == usertypes.Backend.QtWebEngine
monkeypatch.setattr(history.standarddir, 'data', lambda: str(tmpdir))
monkeypatch.setattr(history.objects, 'backend', backend)