blob: 78ad63ca429c5f7c816abe9bb9e858c70c442279 [file] [log] [blame]
Tim Petersfe8a5662006-03-01 06:28:58 +00001import sys
2
3# This is a test module for Python. It looks in the standard
4# places for various *.py files. If these are moved, you must
5# change this module too.
6
7try:
Neal Norwitz10be10c2006-03-16 06:50:13 +00008 import os
Tim Petersfe8a5662006-03-01 06:28:58 +00009except:
Neal Norwitz10be10c2006-03-16 06:50:13 +000010 print """Could not import the standard "os" module.
Tim Petersfe8a5662006-03-01 06:28:58 +000011 Please check your PYTHONPATH environment variable."""
12 sys.exit(1)
13
14try:
Neal Norwitz10be10c2006-03-16 06:50:13 +000015 import symbol
Tim Petersfe8a5662006-03-01 06:28:58 +000016except:
Neal Norwitz10be10c2006-03-16 06:50:13 +000017 print """Could not import the standard "symbol" module. If this is
Tim Petersfe8a5662006-03-01 06:28:58 +000018 a PC, you should add the dos_8x3 directory to your PYTHONPATH."""
19 sys.exit(1)
20
21import os
22
23for dir in sys.path:
Neal Norwitz10be10c2006-03-16 06:50:13 +000024 file = os.path.join(dir, "os.py")
Tim Petersfe8a5662006-03-01 06:28:58 +000025 if os.path.isfile(file):
26 test = os.path.join(dir, "test")
27 if os.path.isdir(test):
28 # Add the "test" directory to PYTHONPATH.
29 sys.path = sys.path + [test]
30
31import regrtest # Standard Python tester.
32regrtest.main()