Use binary mode to open "wave" files.
diff --git a/Lib/test/test_wave.py b/Lib/test/test_wave.py
index a7a5e24..e2dc688 100644
--- a/Lib/test/test_wave.py
+++ b/Lib/test/test_wave.py
@@ -13,7 +13,7 @@
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 @@
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")