mirror of
https://github.com/python/cpython.git
synced 2024-11-28 08:20:55 +01:00
23 lines
424 B
Python
23 lines
424 B
Python
# Python test set -- supporting definitions.
|
|
|
|
TestFailed = 'test_support -- test failed' # Exception
|
|
|
|
def unload(name):
|
|
import sys
|
|
try:
|
|
del sys.modules[name]
|
|
except KeyError:
|
|
pass
|
|
|
|
def forget(modname):
|
|
unload(modname)
|
|
import sys, os
|
|
for dirname in sys.path:
|
|
try:
|
|
os.unlink(os.path.join(dirname, modname + '.pyc'))
|
|
except os.error:
|
|
pass
|
|
|
|
TESTFN = '@test' # Filename used for testing
|
|
from os import unlink
|