mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-01 21:45:10 +00:00
fix(remote): end every remote wait of a run when the user cancels it
This commit is contained in:
+3
-1
@@ -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())
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user