ยปCore Development>Code coverage>PC/testpy.py

Python code coverage for PC/testpy.py

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