mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Initial revision
This commit is contained in:
parent
19a86e72df
commit
3bead0984c
9 changed files with 913 additions and 0 deletions
22
Lib/test/test_support.py
Normal file
22
Lib/test/test_support.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# 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
|
Loading…
Add table
Add a link
Reference in a new issue