[2.7] bpo-28261: Prevent raising SystemError where PyArg_ParseTuple is used to parse non-args. (#3213)
diff --git a/Lib/test/test_audioop.py b/Lib/test/test_audioop.py
index 4af7350..5f1deb5 100644
--- a/Lib/test/test_audioop.py
+++ b/Lib/test/test_audioop.py
@@ -325,6 +325,10 @@
self.assertEqual(audioop.ratecv(datas[w], w, 1, 8000, 8000, None, 30, 10)[0],
expected[w])
+ self.assertRaises(TypeError, audioop.ratecv, b'', 1, 1, 8000, 8000, 42)
+ self.assertRaises(TypeError, audioop.ratecv,
+ b'', 1, 1, 8000, 8000, (1, (42,)))
+
def test_reverse(self):
for w in 1, 2, 4:
self.assertEqual(audioop.reverse(b'', w), b'')