test: leave the process and signal tests out of CI and reset the worker prompt handler

This commit is contained in:
imSp4rky
2026-12-01 11:44:19 -07:00
parent 6e99812e8e
commit 71b8b63037
7 changed files with 14 additions and 6 deletions
+8 -1
View File
@@ -11,7 +11,7 @@ from typing import Any
import pytest
from unshackle.core import binaries, process_exit
from unshackle.core import binaries, console, process_exit
from unshackle.core import session as http_session
from unshackle.core.config import config
from unshackle.core.constants import RunCancel
@@ -69,6 +69,13 @@ def keep_signal_handlers(monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setattr(process_exit, "ends", set())
@pytest.fixture(autouse=True)
def no_worker_handlers(monkeypatch: pytest.MonkeyPatch) -> None:
"""Keep the prompt and notice relay of a job worker out of the next test, whose prompt then waits for an answer."""
monkeypatch.setattr(console, "_prompt_handler", None)
monkeypatch.setattr(console, "_notice_handler", None)
@pytest.fixture(autouse=True)
def fresh_proxy_catalogues() -> None:
"""Fetch each proxy provider catalogue again, so one test's stub never answers another test."""
+1 -1
View File
@@ -39,7 +39,7 @@ from unshackle.core.config import config
from unshackle.core.remote_protocol import SESSION_CREATE_ROUTE, SESSION_ROUTE
from unshackle.core.remote_service import RemoteError
pytestmark = pytest.mark.unit
pytestmark = [pytest.mark.unit, pytest.mark.process]
posix = pytest.mark.skipif(sys.platform == "win32", reason="POSIX signals")
SIGNALS = ["CTRL_BREAK_EVENT"] if sys.platform == "win32" else ["SIGHUP", "SIGTERM"]
+1 -1
View File
@@ -43,7 +43,7 @@ from unshackle.core.remote_protocol import (
APIErrorCode,
)
pytestmark = pytest.mark.unit
pytestmark = [pytest.mark.unit, pytest.mark.process]
RELAY = """
import asyncio, json, sys
+1 -1
View File
@@ -52,7 +52,7 @@ from unshackle.core.remote_protocol import (
)
from unshackle.core.tracks import Audio, Tracks
pytestmark = [pytest.mark.unit, posix]
pytestmark = [pytest.mark.unit, pytest.mark.process, posix]
BOUND = 8.0
WAITING = "Waiting for the remote server"
+1 -1
View File
@@ -50,7 +50,7 @@ from unshackle.core.remote_protocol import (
AuthStatus,
)
pytestmark = pytest.mark.unit
pytestmark = [pytest.mark.unit, pytest.mark.process]
SERVES = {
"api-only": ["--api-only", "--remote-only"],