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
4606d36d
Commit
4606d36d
authored
Oct 14, 2013
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #18919: Check warnings messages in the aifc module tests.
parent
d98d6cb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
Lib/test/test_aifc.py
Lib/test/test_aifc.py
+7
-3
No files found.
Lib/test/test_aifc.py
View file @
4606d36d
...
...
@@ -260,8 +260,10 @@ class AIFCLowLevelTest(unittest.TestCase):
b
+=
b'COMM'
+
struct
.
pack
(
'>LhlhhLL'
,
18
,
0
,
0
,
0
,
0
,
0
,
0
)
b
+=
b'SSND'
+
struct
.
pack
(
'>L'
,
8
)
+
b'
\
x00
'
*
8
b
+=
b'MARK'
+
struct
.
pack
(
'>LhB'
,
3
,
1
,
1
)
with
self
.
assertWarns
(
UserWarning
):
with
self
.
assertWarns
(
UserWarning
)
as
cm
:
f
=
aifc
.
open
(
io
.
BytesIO
(
b
))
self
.
assertEqual
(
str
(
cm
.
warning
),
'Warning: MARK chunk contains '
'only 0 markers instead of 1'
)
self
.
assertEqual
(
f
.
getmarkers
(),
None
)
def
test_read_comm_kludge_compname_even
(
self
):
...
...
@@ -269,8 +271,9 @@ class AIFCLowLevelTest(unittest.TestCase):
b
+=
b'COMM'
+
struct
.
pack
(
'>LhlhhLL'
,
18
,
0
,
0
,
0
,
0
,
0
,
0
)
b
+=
b'NONE'
+
struct
.
pack
(
'B'
,
4
)
+
b'even'
+
b'
\
x00
'
b
+=
b'SSND'
+
struct
.
pack
(
'>L'
,
8
)
+
b'
\
x00
'
*
8
with
self
.
assertWarns
(
UserWarning
):
with
self
.
assertWarns
(
UserWarning
)
as
cm
:
f
=
aifc
.
open
(
io
.
BytesIO
(
b
))
self
.
assertEqual
(
str
(
cm
.
warning
),
'Warning: bad COMM chunk size'
)
self
.
assertEqual
(
f
.
getcompname
(),
b'even'
)
def
test_read_comm_kludge_compname_odd
(
self
):
...
...
@@ -278,8 +281,9 @@ class AIFCLowLevelTest(unittest.TestCase):
b
+=
b'COMM'
+
struct
.
pack
(
'>LhlhhLL'
,
18
,
0
,
0
,
0
,
0
,
0
,
0
)
b
+=
b'NONE'
+
struct
.
pack
(
'B'
,
3
)
+
b'odd'
b
+=
b'SSND'
+
struct
.
pack
(
'>L'
,
8
)
+
b'
\
x00
'
*
8
with
self
.
assertWarns
(
UserWarning
):
with
self
.
assertWarns
(
UserWarning
)
as
cm
:
f
=
aifc
.
open
(
io
.
BytesIO
(
b
))
self
.
assertEqual
(
str
(
cm
.
warning
),
'Warning: bad COMM chunk size'
)
self
.
assertEqual
(
f
.
getcompname
(),
b'odd'
)
def
test_write_params_raises
(
self
):
...
...
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