Add hardening regressions and update operational docs
This commit is contained in:
parent
2b494851a6
commit
9c7d7b35b1
2 changed files with 14 additions and 0 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue