Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 05ba2ab

Browse files
committed
Fix ratecv test (Sjoerd).
1 parent adb3a9d commit 05ba2ab

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

Lib/test/test_audioop.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,12 @@ def testmul(data):
171171

172172
def testratecv(data):
173173
if verbose:
174-
print 'ratecv'
175-
state = (-8000, ((256, 512),))
176-
if audioop.ratecv(data[0], 1, 1, 8000, 16000, state) != \
177-
('\001\000\000\001\001\002', state):
178-
return 0
174+
print 'ratecv'
175+
state = None
176+
d1, state = audioop.ratecv(data[0], 1, 1, 8000, 16000, state)
177+
d2, state = audioop.ratecv(data[0], 1, 1, 8000, 16000, state)
178+
if d1 + d2 != '\000\000\001\001\002\001\000\000\001\001\002':
179+
return 0
179180
return 1
180181

181182
def testreverse(data):

0 commit comments

Comments
 (0)