tests never play the finish tink out loud
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user