summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2023-11-22 15:27:48 +0100
committerFlorian Bruhin <me@the-compiler.org>2023-11-22 18:02:18 +0100
commit9e3d421a15be389ea124cd49c1e43b154b64cc4a (patch)
tree4d64d1a2922820fff653f6b1a872ddf240e30fd4
parent51dace7152ecdff29c4a43325a2a7d5805c2643b (diff)
downloadqutebrowser-9e3d421a15be389ea124cd49c1e43b154b64cc4a.tar.gz
qutebrowser-9e3d421a15be389ea124cd49c1e43b154b64cc4a.zip
pakjoy: Use declarative skipping in tests
-rw-r--r--tests/unit/misc/test_pakjoy.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/unit/misc/test_pakjoy.py b/tests/unit/misc/test_pakjoy.py
index 645764328..1ea37f772 100644
--- a/tests/unit/misc/test_pakjoy.py
+++ b/tests/unit/misc/test_pakjoy.py
@@ -21,16 +21,15 @@ pytest.importorskip("qutebrowser.qt.webenginecore")
versions = version.qtwebengine_versions(avoid_init=True)
-@pytest.fixture
-def skipifneeded():
- """Used to skip happy path tests with the real resources file.
-
- Since we don't know how reliably the Google Meet hangouts extensions is
- reliably in the resource files, and this quirk is only targeting 6.6
- anyway.
- """
- if versions.webengine != utils.VersionNumber(6, 6):
- raise pytest.skip("Code under test only runs on 6.6")
+# Used to skip happy path tests with the real resources file.
+#
+# Since we don't know how reliably the Google Meet hangouts extensions is
+# reliably in the resource files, and this quirk is only targeting 6.6
+# anyway.
+skip_if_unsupported = pytest.mark.skipif(
+ versions.webengine != utils.VersionNumber(6, 6),
+ reason="Code under test only runs on 6.6",
+)
@pytest.fixture(autouse=True)
@@ -98,7 +97,8 @@ def json_without_comments(bytestring):
class TestWithRealResourcesFile:
"""Tests that use the real pak file form the Qt installation."""
- def test_happy_path(self, skipifneeded):
+ @skip_if_unsupported
+ def test_happy_path(self):
# Go through the full patching processes with the real resources file from
# the current installation. Make sure our replacement string is in it
# afterwards.