Issue #19633: Fixed writing not compressed 16- and 32-bit wave files on
big-endian platforms.
Temporary forbidden test_unseekable_incompleted_write fornot compressed 16-
and 32-bit wave file on big-endian platforms.
diff --git a/Lib/wave.py b/Lib/wave.py
index c320238..8ff93c3 100644
--- a/Lib/wave.py
+++ b/Lib/wave.py
@@ -424,7 +424,9 @@
data = self._convert(data)
if self._sampwidth in (2, 4) and sys.byteorder == 'big':
import array
- data = array.array(_array_fmts[self._sampwidth], data)
+ a = array.array(_array_fmts[self._sampwidth])
+ a.fromstring(data)
+ data = a
assert data.itemsize == self._sampwidth
data.byteswap()
data.tofile(self._file)