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
345379a7
Commit
345379a7
authored
Nov 16, 2011
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#13406: correct the error message in check_warnings too.
parent
11060a4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Lib/test/test_codecs.py
Lib/test/test_codecs.py
+3
-3
No files found.
Lib/test/test_codecs.py
View file @
345379a7
...
...
@@ -1030,7 +1030,7 @@ class UnicodeInternalTest(unittest.TestCase):
for
internal
in
not_ok
:
if
sys
.
byteorder
==
"little"
:
internal
=
bytes
(
reversed
(
internal
))
with
support
.
check_warnings
((
'unicode_internal codec
s
has been '
with
support
.
check_warnings
((
'unicode_internal codec has been '
'deprecated'
,
DeprecationWarning
)):
self
.
assertRaises
(
UnicodeDecodeError
,
internal
.
decode
,
"unicode_internal"
)
...
...
@@ -1038,7 +1038,7 @@ class UnicodeInternalTest(unittest.TestCase):
@
unittest
.
skipUnless
(
SIZEOF_WCHAR_T
==
4
,
'specific to 32-bit wchar_t'
)
def
test_decode_error_attributes
(
self
):
try
:
with
support
.
check_warnings
((
'unicode_internal codec
s
has been '
with
support
.
check_warnings
((
'unicode_internal codec has been '
'deprecated'
,
DeprecationWarning
)):
b"
\
x00
\
x00
\
x00
\
x00
\
x00
\
x11
\
x11
\
x00
"
.
decode
(
"unicode_internal"
)
except
UnicodeDecodeError
as
ex
:
...
...
@@ -1053,7 +1053,7 @@ class UnicodeInternalTest(unittest.TestCase):
def
test_decode_callback
(
self
):
codecs
.
register_error
(
"UnicodeInternalTest"
,
codecs
.
ignore_errors
)
decoder
=
codecs
.
getdecoder
(
"unicode_internal"
)
with
support
.
check_warnings
((
'unicode_internal codec
s
has been '
with
support
.
check_warnings
((
'unicode_internal codec has been '
'deprecated'
,
DeprecationWarning
)):
ab
=
"ab"
.
encode
(
"unicode_internal"
).
decode
()
ignored
=
decoder
(
bytes
(
"%s
\
x22
\
x22
\
x22
\
x22
%s"
%
(
ab
[:
4
],
ab
[
4
:]),
...
...
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