diff options
Diffstat (limited to 'tests/unit/misc/test_pakjoy.py')
-rw-r--r-- | tests/unit/misc/test_pakjoy.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/unit/misc/test_pakjoy.py b/tests/unit/misc/test_pakjoy.py index 55a147269..a889fcf49 100644 --- a/tests/unit/misc/test_pakjoy.py +++ b/tests/unit/misc/test_pakjoy.py @@ -39,6 +39,7 @@ skip_if_unsupported = pytest.mark.skipif( def prepare_env(qapp, monkeypatch): monkeypatch.setattr(pakjoy.objects, "qapp", qapp) monkeypatch.delenv(pakjoy.RESOURCES_ENV_VAR, raising=False) + monkeypatch.delenv(pakjoy.DISABLE_ENV_VAR, raising=False) def patch_version(monkeypatch, *args): @@ -77,6 +78,15 @@ def test_version_gate(cache_tmpdir, unaffected_version, mocker, workdir_exists): assert not workdir.exists() +def test_escape_hatch(affected_version, mocker, monkeypatch): + fake_open = mocker.patch("qutebrowser.misc.pakjoy.open") + monkeypatch.setenv(pakjoy.DISABLE_ENV_VAR, "1") + + pakjoy.patch_webengine() + + assert not fake_open.called + + class TestFindWebengineResources: @pytest.fixture def qt_data_path(self, monkeypatch: pytest.MonkeyPatch, tmp_path: pathlib.Path): |