1 | n/a | import sys |
---|
2 | n/a | |
---|
3 | n/a | # This is a test module for Python. It looks in the standard |
---|
4 | n/a | # places for various *.py files. If these are moved, you must |
---|
5 | n/a | # change this module too. |
---|
6 | n/a | |
---|
7 | n/a | try: |
---|
8 | n/a | import os |
---|
9 | n/a | except: |
---|
10 | n/a | print("""Could not import the standard "os" module. |
---|
11 | n/a | Please check your PYTHONPATH environment variable.""") |
---|
12 | n/a | sys.exit(1) |
---|
13 | n/a | |
---|
14 | n/a | try: |
---|
15 | n/a | import symbol |
---|
16 | n/a | except: |
---|
17 | n/a | print("""Could not import the standard "symbol" module. If this is |
---|
18 | n/a | a PC, you should add the dos_8x3 directory to your PYTHONPATH.""") |
---|
19 | n/a | sys.exit(1) |
---|
20 | n/a | |
---|
21 | n/a | for dir in sys.path: |
---|
22 | n/a | file = os.path.join(dir, "os.py") |
---|
23 | n/a | if os.path.isfile(file): |
---|
24 | n/a | test = os.path.join(dir, "test") |
---|
25 | n/a | if os.path.isdir(test): |
---|
26 | n/a | # Add the "test" directory to PYTHONPATH. |
---|
27 | n/a | sys.path = sys.path + [test] |
---|
28 | n/a | |
---|
29 | n/a | import libregrtest # Standard Python tester. |
---|
30 | n/a | libregrtest.main() |
---|