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
997487d5
Commit
997487d5
authored
Jun 07, 2013
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #7732: Move an imp.find_module test from test_import to
test_imp.
parent
abb18af3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
Lib/test/test_imp.py
Lib/test/test_imp.py
+11
-0
Lib/test/test_import.py
Lib/test/test_import.py
+0
-10
No files found.
Lib/test/test_imp.py
View file @
997487d5
...
...
@@ -273,6 +273,17 @@ class ImportTests(unittest.TestCase):
return
imp
.
load_module
(
name
,
None
,
*
found
[
1
:])
@
unittest
.
skipIf
(
sys
.
dont_write_bytecode
,
"test meaningful only when writing bytecode"
)
def
test_bug7732
(
self
):
source
=
support
.
TESTFN
+
'.py'
os
.
mkdir
(
source
)
try
:
self
.
assertRaisesRegex
(
ImportError
,
'^No module'
,
imp
.
find_module
,
support
.
TESTFN
,
[
"."
])
finally
:
os
.
rmdir
(
source
)
class
ReloadTests
(
unittest
.
TestCase
):
...
...
Lib/test/test_import.py
View file @
997487d5
...
...
@@ -127,16 +127,6 @@ class ImportTests(unittest.TestCase):
finally
:
del
sys
.
path
[
0
]
@
skip_if_dont_write_bytecode
def
test_bug7732
(
self
):
source
=
TESTFN
+
'.py'
os
.
mkdir
(
source
)
try
:
self
.
assertRaisesRegex
(
ImportError
,
'^No module'
,
imp
.
find_module
,
TESTFN
,
[
"."
])
finally
:
os
.
rmdir
(
source
)
def
test_module_with_large_stack
(
self
,
module
=
'longlist'
):
# Regression test for http://bugs.python.org/issue561858.
filename
=
module
+
'.py'
...
...
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