我们从Python开源项目中,提取了以下16个代码示例,用于说明如何使用audioop.findmax()。
def test_findmax(self): self.assertEqual(audioop.findmax(data[1], 1), 2)
def test_negativelen(self): # from issue 3306, previously it segfaulted self.assertRaises(audioop.error, audioop.findmax, ''.join(chr(x) for x in range(256)), -2392392)
def test_findmax(self): self.assertEqual(audioop.findmax(datas[2], 1), 5)
def test_negativelen(self): # from issue 3306, previously it segfaulted self.assertRaises(audioop.error, audioop.findmax, ''.join( chr(x) for x in xrange(256)), -2392392)
def test_negativelen(self): # from issue 3306, previously it segfaulted self.assertRaises(audioop.error, audioop.findmax, bytes(range(256)), -2392392)
def test_findmax(self): self.assertEqual(audioop.findmax(datas[2], 1), 5) self.assertEqual(audioop.findmax(bytearray(datas[2]), 1), 5) self.assertEqual(audioop.findmax(memoryview(datas[2]), 1), 5)