summaryrefslogtreecommitdiff
path: root/Lib/test/test_wave.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_wave.py')
-rw-r--r--Lib/test/test_wave.py21
1 files changed, 4 insertions, 17 deletions
diff --git a/Lib/test/test_wave.py b/Lib/test/test_wave.py
index f64201f9fc..3eff773bca 100644
--- a/Lib/test/test_wave.py
+++ b/Lib/test/test_wave.py
@@ -1,6 +1,7 @@
from test.support import TESTFN
import unittest
from test import audiotests
+from audioop import byteswap
import sys
import wave
@@ -8,9 +9,6 @@ import wave
class WaveTest(audiotests.AudioWriteTests,
audiotests.AudioTestsWithSourceFile):
module = wave
- test_unseekable_write = None
- test_unseekable_overflowed_write = None
- test_unseekable_incompleted_write = None
class WavePCM8Test(WaveTest, unittest.TestCase):
@@ -48,13 +46,7 @@ class WavePCM16Test(WaveTest, unittest.TestCase):
E4B50CEB 63440A5A 08CA0A1F 2BBA0B0B 51460E47 8BCB113C B6F50EEA 44150A59 \
""")
if sys.byteorder != 'big':
- frames = audiotests.byteswap2(frames)
-
- if sys.byteorder == 'big':
- @unittest.expectedFailure
- def test_unseekable_incompleted_write(self):
- super().test_unseekable_incompleted_write()
-
+ frames = byteswap(frames, 2)
class WavePCM24Test(WaveTest, unittest.TestCase):
@@ -81,7 +73,7 @@ class WavePCM24Test(WaveTest, unittest.TestCase):
51486F0E44E1 8BCC64113B05 B6F4EC0EEB36 4413170A5B48 \
""")
if sys.byteorder != 'big':
- frames = audiotests.byteswap3(frames)
+ frames = byteswap(frames, 3)
class WavePCM32Test(WaveTest, unittest.TestCase):
@@ -108,12 +100,7 @@ class WavePCM32Test(WaveTest, unittest.TestCase):
51486F800E44E190 8BCC6480113B0580 B6F4EC000EEB3630 441317800A5B48A0 \
""")
if sys.byteorder != 'big':
- frames = audiotests.byteswap4(frames)
-
- if sys.byteorder == 'big':
- @unittest.expectedFailure
- def test_unseekable_incompleted_write(self):
- super().test_unseekable_incompleted_write()
+ frames = byteswap(frames, 4)
if __name__ == '__main__':