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
a0e9613c
Commit
a0e9613c
authored
Oct 14, 2012
by
Nadeem Vawda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up some warnings in test suite output.
parent
af0841de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
Lib/test/test_exceptions.py
Lib/test/test_exceptions.py
+5
-4
Lib/test/test_importlib/import_/test_fromlist.py
Lib/test/test_importlib/import_/test_fromlist.py
+1
-1
No files found.
Lib/test/test_exceptions.py
View file @
a0e9613c
...
...
@@ -8,7 +8,7 @@ import weakref
import
errno
from
test.support
import
(
TESTFN
,
unlink
,
run_unittest
,
captured_output
,
gc_collect
,
cpython_only
,
no_tracing
)
check_warnings
,
gc_collect
,
cpython_only
,
no_tracing
)
class
NaiveException
(
Exception
):
def
__init__
(
self
,
x
):
...
...
@@ -939,9 +939,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
():
...
...
Lib/test/test_importlib/import_/test_fromlist.py
View file @
a0e9613c
...
...
@@ -80,7 +80,7 @@ class HandlingFromlist(unittest.TestCase):
with
util
.
import_state
(
meta_path
=
[
importer
]):
with
self
.
assertRaises
(
ImportError
)
as
exc
:
import_util
.
import_
(
'pkg'
,
fromlist
=
[
'mod'
])
self
.
assertEqual
s
(
'i_do_not_exist'
,
exc
.
exception
.
name
)
self
.
assertEqual
(
'i_do_not_exist'
,
exc
.
exception
.
name
)
def
test_empty_string
(
self
):
with
util
.
mock_modules
(
'pkg.__init__'
,
'pkg.mod'
)
as
importer
:
...
...
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