summaryrefslogtreecommitdiff
path: root/Lib/test/test_runpy.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2007-08-23 14:53:17 +0000
committerBrett Cannon <bcannon@gmail.com>2007-08-23 14:53:17 +0000
commitdbed7a73942c2fb3dbdd2353527bb8c918446cab (patch)
tree53b584582aa9ce5108e9aef6ed046fc97f90885a /Lib/test/test_runpy.py
parent879975677adb31c94384004e88b80e1da3528db8 (diff)
downloadcpython-git-dbed7a73942c2fb3dbdd2353527bb8c918446cab.tar.gz
Make test_runpy re-entrant.
Diffstat (limited to 'Lib/test/test_runpy.py')
-rw-r--r--Lib/test/test_runpy.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_runpy.py b/Lib/test/test_runpy.py
index 3a5a70963b..7076df7966 100644
--- a/Lib/test/test_runpy.py
+++ b/Lib/test/test_runpy.py
@@ -4,7 +4,7 @@ import os
import os.path
import sys
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
# Set up the test code and expected results
@@ -156,6 +156,7 @@ class RunModuleTest(unittest.TestCase):
def _check_module(self, depth):
pkg_dir, mod_fname, mod_name = (
self._make_pkg("x=1\n", depth))
+ forget(mod_name)
try:
if verbose: print "Running from source:", mod_name
d1 = run_module(mod_name) # Read from source