Add hardening regressions and update operational docs

This commit is contained in:
Thales Maciel 2026-02-26 16:40:45 -03:00
parent 2b494851a6
commit 9c7d7b35b1
2 changed files with 14 additions and 0 deletions

View file

@ -137,6 +137,15 @@ class RecorderTests(unittest.TestCase):
):
recorder.start_recording("NotADevice")
def test_start_recording_invalid_explicit_index_raises(self):
sd = _FakeSoundDevice()
with patch("recorder._sounddevice", return_value=sd):
with self.assertRaisesRegex(
ValueError,
"did not match any input device; available inputs: 1:Laptop Mic, 2:USB Interface",
):
recorder.start_recording(99)
def test_start_recording_empty_input_uses_default(self):
sd = _FakeSoundDevice()
with patch("recorder._sounddevice", return_value=sd):