From 78338d84a7b4136aaf5bb85d25a5e9a4acb6d930 Mon Sep 17 00:00:00 2001 From: trav Date: Tue, 13 Oct 2026 10:22:06 -0700 Subject: [PATCH] tests never play the finish tink out loud --- tests/conftest.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 5d29086..f6162af 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -26,6 +26,16 @@ def _no_real_device(monkeypatch): monkeypatch.setattr(device_sync, "find_device", lambda: None) +@pytest.fixture(autouse=True) +def _no_real_sound(monkeypatch): + """No test may play the finish "tink" out loud: every test that runs an + export, sync or import to the end used to, and trav hears it while the + suite runs. Tests about the sound patch ``_tink`` themselves.""" + from unittest.mock import MagicMock + from lintunes.gui import sounds + monkeypatch.setattr(sounds, "_tink", MagicMock()) + + @pytest.fixture(scope="session") def qapp(): """A Qt application so QObject/QTimer and real widgets work in tests.