diff options
Diffstat (limited to 'Lib/test/test_support.py')
-rw-r--r-- | Lib/test/test_support.py | 22 |
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 |