summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2023-06-09 20:06:40 +0200
committerFlorian Bruhin <me@the-compiler.org>2023-06-09 20:06:40 +0200
commitc62e9aba5b3a07c3f2d821e8efa2bfff4e572997 (patch)
treeb5240e93aade394f85a35d80827c3a0a4105c014
parent52c7ec57c1dc8607e253866ca03ef5af7193b03b (diff)
downloadqutebrowser-c62e9aba5b3a07c3f2d821e8efa2bfff4e572997.tar.gz
qutebrowser-c62e9aba5b3a07c3f2d821e8efa2bfff4e572997.zip
Work around Python 3.12 test issues
See #7727
-rw-r--r--tests/end2end/test_invocations.py4
-rw-r--r--tests/unit/utils/test_standarddir.py3
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/end2end/test_invocations.py b/tests/end2end/test_invocations.py
index ce38eec24..164bf516e 100644
--- a/tests/end2end/test_invocations.py
+++ b/tests/end2end/test_invocations.py
@@ -275,7 +275,9 @@ def test_version(request):
print(stderr)
assert ok
- assert proc.exitStatus() == QProcess.ExitStatus.NormalExit
+ if sys.version_info != (3, 12, 0, "beta", 2):
+ # WORKAROUND for https://www.riverbankcomputing.com/pipermail/pyqt/2023-June/045331.html
+ assert proc.exitStatus() == QProcess.ExitStatus.NormalExit
match = re.search(r'^qutebrowser\s+v\d+(\.\d+)', stdout, re.MULTILINE)
assert match is not None
diff --git a/tests/unit/utils/test_standarddir.py b/tests/unit/utils/test_standarddir.py
index ef1da5a07..0ce8001b1 100644
--- a/tests/unit/utils/test_standarddir.py
+++ b/tests/unit/utils/test_standarddir.py
@@ -482,9 +482,10 @@ def test_no_qapplication(qapp, tmpdir, monkeypatch):
home_dir.ensure(dir=True)
monkeypatch.setenv('HOME', str(home_dir))
+ # check=False on Python 3.12 as WORKAROUND for https://www.riverbankcomputing.com/pipermail/pyqt/2023-June/045331.html
proc = subprocess.run([sys.executable, str(pyfile)] + sys.path,
text=True,
- check=True,
+ check=sys.version_info != (3, 12, 0, "beta", 2),
stdout=subprocess.PIPE)
sub_locations = json.loads(proc.stdout)