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
371963da
Commit
371963da
authored
Feb 28, 2017
by
Benjamin Peterson
Committed by
GitHub
Feb 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use select instead of _opcode for import test (#372)
parent
bee93f2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Lib/test/test_import/__init__.py
Lib/test/test_import/__init__.py
+5
-5
No files found.
Lib/test/test_import/__init__.py
View file @
371963da
...
...
@@ -88,12 +88,12 @@ class ImportTests(unittest.TestCase):
self
.
assertRegex
(
str
(
cm
.
exception
),
"cannot import name 'i_dont_exist' from 'os'
\
(.*os.py
\
)"
)
def
test_from_import_missing_attr_has_name_and_so_path
(
self
):
import
_opcode
import
select
with
self
.
assertRaises
(
ImportError
)
as
cm
:
from
_opcode
import
i_dont_exist
self
.
assertEqual
(
cm
.
exception
.
name
,
'
_opcode
'
)
self
.
assertEqual
(
cm
.
exception
.
path
,
_opcode
.
__file__
)
self
.
assertRegex
(
str
(
cm
.
exception
),
"cannot import name 'i_dont_exist' from '
_opcode'
\
(.*
\
.(so|dll
)
\
)
"
)
from
select
import
i_dont_exist
self
.
assertEqual
(
cm
.
exception
.
name
,
'
select
'
)
self
.
assertEqual
(
cm
.
exception
.
path
,
select
.
__file__
)
self
.
assertRegex
(
str
(
cm
.
exception
),
"cannot import name 'i_dont_exist' from '
select'
\
(.*
\
.(so|pyd
)
\
)
"
)
def test_from_import_missing_attr_has_name(self):
with self.assertRaises(ImportError) as cm:
...
...
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