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
dbed7a73
Commit
dbed7a73
authored
Aug 23, 2007
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make test_runpy re-entrant.
parent
87997567
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
Lib/test/test_runpy.py
Lib/test/test_runpy.py
+2
-1
Misc/NEWS
Misc/NEWS
+4
-0
No files found.
Lib/test/test_runpy.py
View file @
dbed7a73
...
@@ -4,7 +4,7 @@ import os
...
@@ -4,7 +4,7 @@ import os
import
os.path
import
os.path
import
sys
import
sys
import
tempfile
import
tempfile
from
test.test_support
import
verbose
,
run_unittest
from
test.test_support
import
verbose
,
run_unittest
,
forget
from
runpy
import
_run_module_code
,
run_module
from
runpy
import
_run_module_code
,
run_module
# Set up the test code and expected results
# Set up the test code and expected results
...
@@ -156,6 +156,7 @@ class RunModuleTest(unittest.TestCase):
...
@@ -156,6 +156,7 @@ class RunModuleTest(unittest.TestCase):
def
_check_module
(
self
,
depth
):
def
_check_module
(
self
,
depth
):
pkg_dir
,
mod_fname
,
mod_name
=
(
pkg_dir
,
mod_fname
,
mod_name
=
(
self
.
_make_pkg
(
"x=1
\
n
"
,
depth
))
self
.
_make_pkg
(
"x=1
\
n
"
,
depth
))
forget
(
mod_name
)
try
:
try
:
if
verbose
:
print
"Running from source:"
,
mod_name
if
verbose
:
print
"Running from source:"
,
mod_name
d1
=
run_module
(
mod_name
)
# Read from source
d1
=
run_module
(
mod_name
)
# Read from source
...
...
Misc/NEWS
View file @
dbed7a73
...
@@ -832,6 +832,10 @@ Extension Modules
...
@@ -832,6 +832,10 @@ Extension Modules
Tests
Tests
-----
-----
- Make test_runpy reentrant by fixing _check_module to clear out any module
being tested. Was causing an error by __import__ doing a reload on the
second run and thus suppressing bytecode recreation.
- Capture socket connection resets and timeouts in test_socket_ssl and
- Capture socket connection resets and timeouts in test_socket_ssl and
test_urllib2net and raise test.test_support.ResourceDenied.
test_urllib2net and raise test.test_support.ResourceDenied.
...
...
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