summaryrefslogtreecommitdiff
path: root/tests/unit/utils/test_qtutils.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-01-11 12:00:30 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-01-11 18:47:15 +0100
commitc1758230200814e84055f3e2954cb69f0fddf5d8 (patch)
treeb9123f2c04e3337084e0894c0bb17574b9704311 /tests/unit/utils/test_qtutils.py
parent8760dc1b17dcf06f7253a9ce7ac7a15af0785492 (diff)
downloadqutebrowser-c1758230200814e84055f3e2954cb69f0fddf5d8.tar.gz
qutebrowser-c1758230200814e84055f3e2954cb69f0fddf5d8.zip
Add objects.qapp to avoid needing to None-check
We know that QApplication.instance() will always be non-None for practical purposes, but the stubs now (correctly) declare it as Optional. See https://github.com/stlehmann/PyQt5-stubs/pull/126
Diffstat (limited to 'tests/unit/utils/test_qtutils.py')
-rw-r--r--tests/unit/utils/test_qtutils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit/utils/test_qtutils.py b/tests/unit/utils/test_qtutils.py
index 816cd8621..e68136695 100644
--- a/tests/unit/utils/test_qtutils.py
+++ b/tests/unit/utils/test_qtutils.py
@@ -122,7 +122,7 @@ def test_is_new_qtwebkit(monkeypatch, version, is_new):
])
def test_is_single_process(monkeypatch, stubs, backend, arguments, single_process):
qapp = stubs.FakeQApplication(arguments=arguments)
- monkeypatch.setattr(qtutils, 'QApplication', qapp)
+ monkeypatch.setattr(qtutils.objects, 'qapp', qapp)
monkeypatch.setattr(qtutils.objects, 'backend', backend)
assert qtutils.is_single_process() == single_process