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
5f4fb913
Commit
5f4fb913
authored
May 19, 1998
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test that "import sys.imp" fails as it should.
parent
9c0afe5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
Lib/test/test_pkg.py
Lib/test/test_pkg.py
+12
-1
No files found.
Lib/test/test_pkg.py
View file @
5f4fb913
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
import
sys
,
os
,
string
,
tempfile
,
traceback
import
sys
,
os
,
string
,
tempfile
,
traceback
from
os
import
mkdir
,
rmdir
# Can't test if these fail
from
os
import
mkdir
,
rmdir
# Can't test if these fail
del
mkdir
,
rmdir
del
mkdir
,
rmdir
from
test_support
import
verbose
from
test_support
import
verbose
,
TestFailed
# Helpers to create and destroy hierarchies.
# Helpers to create and destroy hierarchies.
...
@@ -212,3 +212,14 @@ for name, hier, code in tests:
...
@@ -212,3 +212,14 @@ for name, hier, code in tests:
continue
continue
print
"running test"
,
name
print
"running test"
,
name
runtest
(
hier
,
code
)
runtest
(
hier
,
code
)
# Test
import
sys
import
imp
try
:
import
sys.imp
except
ImportError
:
# This is what we expect
pass
else
:
raise
TestFailed
,
"No ImportError exception on 'import sys.imp'"
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