Mock streaming prep sleep in tests

- add an autouse fixture that patches stream-prep sleep to a no-op
- keep the polling branches covered while removing the long test delay
pull/445/head
Antti Kettunen 4 weeks ago
parent c97a072f54
commit 761fc29523
No known key found for this signature in database
GPG Key ID: C6B2A3D250359BD7

@ -26,6 +26,12 @@ class _FakeSoulseek:
return True
@pytest.fixture(autouse=True)
def _no_sleep(monkeypatch):
"""Keep stream-prep tests fast while still exercising the polling branches."""
monkeypatch.setattr(sp.time, 'sleep', lambda *_args, **_kwargs: None)
def _build_deps(
*,
state=None,

Loading…
Cancel
Save