blob: de6a8ea21aebe6a6cb4a799199100902c19aac10 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# Copyright 2017-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
import pytest
from qutebrowser.misc import objects
from qutebrowser.utils import usertypes
@pytest.mark.parametrize('func', [
lambda: objects.NoBackend() == usertypes.Backend.QtWebEngine,
lambda: objects.NoBackend() != usertypes.Backend.QtWebEngine,
lambda: objects.NoBackend() in [usertypes.Backend.QtWebEngine],
])
def test_no_backend(func):
with pytest.raises(AssertionError, match='No backend set!'):
func()
|