Guido van Rossum | 3bead09 | 1992-01-27 17:00:37 +0000 | [diff] [blame] | 1 | # Python test set -- supporting definitions. |
2 | |||||
3 | TestFailed = 'test_support -- test failed' # Exception | ||||
4 | |||||
5 | def unload(name): | ||||
6 | import sys | ||||
7 | try: | ||||
8 | del sys.modules[name] | ||||
9 | except KeyError: | ||||
10 | pass | ||||
11 | |||||
12 | def forget(modname): | ||||
13 | unload(modname) | ||||
14 | import sys, os | ||||
15 | for dirname in sys.path: | ||||
16 | try: | ||||
17 | os.unlink(os.path.join(dirname, modname + '.pyc')) | ||||
18 | except os.error: | ||||
19 | pass | ||||
20 | |||||
21 | TESTFN = '@test' # Filename used for testing | ||||
22 | from os import unlink |