]> granicus.if.org Git - python/commitdiff
Use binary mode to open "wave" files.
authorGuido van Rossum <guido@python.org>
Tue, 19 Dec 2000 06:32:57 +0000 (06:32 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 19 Dec 2000 06:32:57 +0000 (06:32 +0000)
Lib/test/test_wave.py

index a7a5e24d4afb3c931a40dbf267be77c5c7fd764c..e2dc68892ddb95238541ffde705725ec5dea47a9 100644 (file)
@@ -13,7 +13,7 @@ nframes = 100
 
 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 @@ output = '\0' * nframes * nchannels * sampwidth
 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")