fix(remote): end every remote wait of a run when the user cancels it

This commit is contained in:
imSp4rky
2026-11-30 19:59:26 -07:00
parent b826eccb86
commit b907069eb5
13 changed files with 873 additions and 42 deletions
+3 -1
View File
@@ -14,6 +14,7 @@ import pytest
from unshackle.core import binaries, process_exit
from unshackle.core import session as http_session
from unshackle.core.config import config
from unshackle.core.constants import RunCancel
from unshackle.core.providers import anilist
from unshackle.core.proxies.proxy import CATALOGUES
from unshackle.core.update_checker import UpdateChecker
@@ -61,9 +62,10 @@ def client_process(monkeypatch: pytest.MonkeyPatch) -> None:
@pytest.fixture(autouse=True)
def keep_signal_handlers(monkeypatch: pytest.MonkeyPatch) -> None:
"""Keep the signal handlers of a command or a job worker out of the pytest process."""
"""Keep the signal handlers and the cancel of a command or a job worker out of the pytest process."""
monkeypatch.setattr(process_exit, "listen", lambda *args: None)
monkeypatch.setattr(process_exit.Stop, "raised", False)
monkeypatch.setattr(RunCancel, "pressed", False)
monkeypatch.setattr(process_exit, "ends", set())