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
fe4ef392
Commit
fe4ef392
authored
Feb 07, 2014
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Silence BytesWarning (backport 267a4d4d9d65).
parent
bc27a050
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
Lib/test/test_exceptions.py
Lib/test/test_exceptions.py
+6
-5
No files found.
Lib/test/test_exceptions.py
View file @
fe4ef392
...
...
@@ -8,8 +8,8 @@ import weakref
import
errno
from
test.support
import
(
TESTFN
,
captured_output
,
check_impl_detail
,
c
python_only
,
gc_collect
,
run_unittest
,
no_tracing
,
unlink
)
c
heck_warnings
,
cpython_only
,
gc_collect
,
no_tracing
,
run_unittest
,
unlink
)
class
NaiveException
(
Exception
):
def
__init__
(
self
,
x
):
...
...
@@ -960,9 +960,10 @@ class ImportErrorTests(unittest.TestCase):
def
test_non_str_argument
(
self
):
# Issue #15778
arg
=
b'abc'
exc
=
ImportError
(
arg
)
self
.
assertEqual
(
str
(
arg
),
str
(
exc
))
with
check_warnings
((
''
,
BytesWarning
),
quiet
=
True
):
arg
=
b'abc'
exc
=
ImportError
(
arg
)
self
.
assertEqual
(
str
(
arg
),
str
(
exc
))
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