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
This commit is contained in:
parent
c97a072f54
commit
761fc29523
1 changed files with 6 additions and 0 deletions
|
|
@ -26,6 +26,12 @@ class _FakeSoulseek:
|
||||||
return True
|
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(
|
def _build_deps(
|
||||||
*,
|
*,
|
||||||
state=None,
|
state=None,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue