summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_support.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-01-27 17:00:37 (GMT)
committerGuido van Rossum <guido@python.org>1992-01-27 17:00:37 (GMT)
commit3bead0984c802a2f709076bb9c8531fc67f56ee8 (patch)
tree853b49f1a9932b1f8296449bad1902dca7ea23df /Lib/test/test_support.py
parent19a86e72df72ff8e0b3a6f0d97b233bd22b70b7d (diff)
downloadcpython-3bead0984c802a2f709076bb9c8531fc67f56ee8.zip
cpython-3bead0984c802a2f709076bb9c8531fc67f56ee8.tar.gz
cpython-3bead0984c802a2f709076bb9c8531fc67f56ee8.tar.bz2
Initial revision
Diffstat (limited to 'Lib/test/test_support.py')
-rw-r--r--Lib/test/test_support.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
new file mode 100644
index 0000000..c6d0611
--- /dev/null
+++ b/Lib/test/test_support.py
@@ -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