Mercurial > hg > auditok
diff tests/test_core.py @ 307:334c8760e80f
Force specifying max_read when reading from microphone in AudioRegion.load
author | Amine Sehili <amine.sehili@gmail.com> |
---|---|
date | Fri, 11 Oct 2019 20:58:49 +0100 |
parents | de1afab6a4e5 |
children | bc963239143f |
line wrap: on
line diff
--- a/tests/test_core.py Fri Oct 11 20:43:07 2019 +0100 +++ b/tests/test_core.py Fri Oct 11 20:58:49 2019 +0100 @@ -1079,6 +1079,14 @@ str(audio_param_err.exception), ) + def test_load_exception(self): + with self.assertRaises(ValueError) as val_err: + AudioRegion.load(None, sr=16000, sw=2, ch=1) + self.assertEqual( + "'max_read' should not be None when reading from microphone", + str(val_err.exception), + ) + @genty_dataset( simple=("output.wav", 1.230, "output.wav"), start=("output_{meta.start:g}.wav", 1.230, "output_1.23.wav"),