You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
831 B

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