summaryrefslogtreecommitdiff
path: root/tests/unit/misc/test_pakjoy.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/misc/test_pakjoy.py')
-rw-r--r--tests/unit/misc/test_pakjoy.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/unit/misc/test_pakjoy.py b/tests/unit/misc/test_pakjoy.py
index 26c386759..d4bb37d41 100644
--- a/tests/unit/misc/test_pakjoy.py
+++ b/tests/unit/misc/test_pakjoy.py
@@ -62,11 +62,18 @@ def affected_version(monkeypatch):
patch_version(monkeypatch, 6, 6)
-def test_version_gate(unaffected_version, mocker):
-
+@pytest.mark.parametrize("workdir_exists", [True, False])
+def test_version_gate(cache_tmpdir, unaffected_version, mocker, workdir_exists):
+ workdir = cache_tmpdir / "webengine_resources_pak_quirk"
+ if workdir_exists:
+ workdir.mkdir()
+ (workdir / "some_patched_file.pak").ensure()
fake_open = mocker.patch("qutebrowser.misc.pakjoy.open")
+
pakjoy.patch_webengine()
+
assert not fake_open.called
+ assert not workdir.exists()
@pytest.fixture(autouse=True)