mirror of
https://github.com/python/cpython
synced 2024-09-20 04:41:47 +00:00
Use binary mode to open "wave" files.
This commit is contained in:
parent
5db5ba1ee3
commit
70f128861f
|
@ -13,7 +13,7 @@ def check(t, msg=None):
|
|||
|
||||
testfile = tempfile.mktemp()
|
||||
|
||||
f = wave.open(testfile, 'w')
|
||||
f = wave.open(testfile, 'wb')
|
||||
f.setnchannels(nchannels)
|
||||
f.setsampwidth(sampwidth)
|
||||
f.setframerate(framerate)
|
||||
|
@ -22,7 +22,7 @@ def check(t, msg=None):
|
|||
f.writeframes(output)
|
||||
f.close()
|
||||
|
||||
f = wave.open(testfile, 'r')
|
||||
f = wave.open(testfile, 'rb')
|
||||
check(nchannels == f.getnchannels(), "nchannels")
|
||||
check(sampwidth == f.getsampwidth(), "sampwidth")
|
||||
check(framerate == f.getframerate(), "framerate")
|
||||
|
|
Loading…
Reference in a new issue