MCPcopy Create free account
hub / github.com/livekit/agents / test_shift

Method test_shift

tests/test_utils/test_audio_array_buffer.py:110–114  ·  view source on GitHub ↗
(self, data: list[int], shift: int, expected: list[int])

Source from the content-addressed store, hash-verified

108 ids=["removes_oldest", "shift_all", "clamps_to_available", "zero_is_noop"],
109 )
110 def test_shift(self, data: list[int], shift: int, expected: list[int]) -> None:
111 buf = AudioArrayBuffer(buffer_size=10)
112 buf.push_frame(_frame(data))
113 buf.shift(shift)
114 _assert_eq(buf, expected)
115
116 def test_on_empty(self) -> None:
117 buf = AudioArrayBuffer(buffer_size=10)

Callers

nothing calls this directly

Calls 5

push_frameMethod · 0.95
shiftMethod · 0.95
AudioArrayBufferClass · 0.90
_frameFunction · 0.85
_assert_eqFunction · 0.85

Tested by

no test coverage detected