Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2235648b
Commit
2235648b
authored
Oct 17, 2013
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue 19276: Fix tests for wave files on big-endian platforms.
Skip tests for 24-bit wave file on big-endian platforms.
parent
a5cd255a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
Lib/test/test_wave.py
Lib/test/test_wave.py
+10
-3
No files found.
Lib/test/test_wave.py
View file @
2235648b
from
test.test_support
import
TESTFN
,
run_unittest
import
unittest
from
test
import
audiotests
import
sys
import
wave
...
...
@@ -44,9 +45,13 @@ class WavePCM16Test(audiotests.AudioWriteTests,
EEDF1755 82061666 7FFF1446 80001296 499C0EB2 52BA0DB9 EFB70F5C CE400FBC
\
E4B50CEB 63440A5A 08CA0A1F 2BBA0B0B 51460E47 8BCB113C B6F50EEA 44150A59
\
"""
)
frames
=
audiotests
.
byteswap2
(
frames
)
if
sys
.
byteorder
!=
'big'
:
frames
=
audiotests
.
byteswap2
(
frames
)
@
unittest
.
skipIf
(
sys
.
byteorder
==
'big'
,
'24-bit wave files are supported only on little-endian '
'platforms'
)
class
WavePCM24Test
(
audiotests
.
AudioWriteTests
,
audiotests
.
AudioTestsWithSourceFile
,
unittest
.
TestCase
):
...
...
@@ -73,7 +78,8 @@ class WavePCM24Test(audiotests.AudioWriteTests,
E4B49C0CEA2D 6344A80A5A7C 08C8FE0A1FFE 2BB9860B0A0E
\
51486F0E44E1 8BCC64113B05 B6F4EC0EEB36 4413170A5B48
\
"""
)
frames
=
audiotests
.
byteswap3
(
frames
)
if
sys
.
byteorder
!=
'big'
:
frames
=
audiotests
.
byteswap3
(
frames
)
class
WavePCM32Test
(
audiotests
.
AudioWriteTests
,
...
...
@@ -102,7 +108,8 @@ class WavePCM32Test(audiotests.AudioWriteTests,
E4B49CC00CEA2D90 6344A8800A5A7CA0 08C8FE800A1FFEE0 2BB986C00B0A0E00
\
51486F800E44E190 8BCC6480113B0580 B6F4EC000EEB3630 441317800A5B48A0
\
"""
)
frames
=
audiotests
.
byteswap4
(
frames
)
if
sys
.
byteorder
!=
'big'
:
frames
=
audiotests
.
byteswap4
(
frames
)
def
test_main
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment