# HG changeset patch # User Amine Sehili # Date 1550778797 -3600 # Node ID 81413c14c5bba48663b4be164a68615f8bcb015a # Parent 2a1054f9d9f36591f83a4f1dfe02445830c689b1 Add tests for _extract_selected_channel with wrong use_channel value diff -r 2a1054f9d9f3 -r 81413c14c5bb tests/test_io.py --- a/tests/test_io.py Wed Feb 20 21:17:21 2019 +0100 +++ b/tests/test_io.py Thu Feb 21 20:53:17 2019 +0100 @@ -279,6 +279,11 @@ selected_channel = _extract_selected_channel(data, channels, 2, "mix") self.assertEqual(selected_channel, expected) + @genty_dataset(positive=(2,), negative=(-3,)) + def test_extract_selected_channel_invalid_use_channel(self, use_channel): + with self.assertRaises(AudioParameterError): + _extract_selected_channel(b"\0\0", 2, 2, use_channel) + @genty_dataset( raw_with_audio_format=( "audio",