blob: 709f35c4525877275269703f23974aa0727661aa [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:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008 import os
Tim Petersfe8a5662006-03-01 06:28:58 +00009except:
Collin Winterb13c4932007-08-30 18:50:25 +000010 print("""Could not import the standard "os" module.
11 Please check your PYTHONPATH environment variable.""")
Tim Petersfe8a5662006-03-01 06:28:58 +000012 sys.exit(1)
13
14try:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015 import symbol
Tim Petersfe8a5662006-03-01 06:28:58 +000016except:
Collin Winterb13c4932007-08-30 18:50:25 +000017 print("""Could not import the standard "symbol" module. If this is
18 a PC, you should add the dos_8x3 directory to your PYTHONPATH.""")
Tim Petersfe8a5662006-03-01 06:28:58 +000019 sys.exit(1)
20
Tim Petersfe8a5662006-03-01 06:28:58 +000021for dir in sys.path:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000022 file = os.path.join(dir, "os.py")
Tim Petersfe8a5662006-03-01 06:28:58 +000023 if os.path.isfile(file):
24 test = os.path.join(dir, "test")
25 if os.path.isdir(test):
26 # Add the "test" directory to PYTHONPATH.
27 sys.path = sys.path + [test]
28
Victor Stinner3aac0ad2016-03-24 17:53:20 +010029import libregrtest # Standard Python tester.
30libregrtest.main()