RemiFabre
commited on
Commit
·
3a771b0
1
Parent(s):
091c62e
Minor, better test comments
Browse files
tests/audio/test_head_wobbler.py
CHANGED
|
@@ -41,6 +41,7 @@ def _start_wobbler() -> Tuple[HeadWobbler, List[Tuple[float, Tuple[float, float,
|
|
| 41 |
|
| 42 |
|
| 43 |
def test_reset_drops_pending_offsets() -> None:
|
|
|
|
| 44 |
wobbler, captured = _start_wobbler()
|
| 45 |
try:
|
| 46 |
wobbler.feed(_make_audio_chunk(duration_s=0.35))
|
|
@@ -55,6 +56,7 @@ def test_reset_drops_pending_offsets() -> None:
|
|
| 55 |
|
| 56 |
|
| 57 |
def test_reset_allows_future_offsets() -> None:
|
|
|
|
| 58 |
wobbler, captured = _start_wobbler()
|
| 59 |
try:
|
| 60 |
wobbler.feed(_make_audio_chunk(duration_s=0.35))
|
|
@@ -71,6 +73,7 @@ def test_reset_allows_future_offsets() -> None:
|
|
| 71 |
|
| 72 |
|
| 73 |
def test_reset_during_inflight_chunk_keeps_worker(monkeypatch) -> None:
|
|
|
|
| 74 |
wobbler, captured = _start_wobbler()
|
| 75 |
ready = threading.Event()
|
| 76 |
release = threading.Event()
|
|
|
|
| 41 |
|
| 42 |
|
| 43 |
def test_reset_drops_pending_offsets() -> None:
|
| 44 |
+
"""Reset should stop wobble output derived from pre-reset audio."""
|
| 45 |
wobbler, captured = _start_wobbler()
|
| 46 |
try:
|
| 47 |
wobbler.feed(_make_audio_chunk(duration_s=0.35))
|
|
|
|
| 56 |
|
| 57 |
|
| 58 |
def test_reset_allows_future_offsets() -> None:
|
| 59 |
+
"""After reset, fresh audio must still produce wobble offsets."""
|
| 60 |
wobbler, captured = _start_wobbler()
|
| 61 |
try:
|
| 62 |
wobbler.feed(_make_audio_chunk(duration_s=0.35))
|
|
|
|
| 73 |
|
| 74 |
|
| 75 |
def test_reset_during_inflight_chunk_keeps_worker(monkeypatch) -> None:
|
| 76 |
+
"""Simulate reset during chunk processing to ensure the worker survives."""
|
| 77 |
wobbler, captured = _start_wobbler()
|
| 78 |
ready = threading.Event()
|
| 79 |
release = threading.Event()
|