Staging
v0.5.1
https://github.com/python/cpython
Revision 7eeb80b1e0034fd4e6b8d03b2c0fc5c94fe8d8fa authored by Miss Islington (bot) on 13 September 2018, 17:32:44 UTC, committed by GitHub on 13 September 2018, 17:32:44 UTC
(cherry picked from commit a710ebd21b09efe902dde84d4862ce5c6427f7af)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
1 parent 3e3d4a4
Raw File
Tip revision: 7eeb80b1e0034fd4e6b8d03b2c0fc5c94fe8d8fa authored by Miss Islington (bot) on 13 September 2018, 17:32:44 UTC
closes bpo-34661: Fix test_shutil if unzip doesn't support -t. (GH-9262)
Tip revision: 7eeb80b
testpy.py
import sys

# This is a test module for Python.  It looks in the standard
# places for various *.py files.  If these are moved, you must
# change this module too.

try:
    import os
except:
    print("""Could not import the standard "os" module.
  Please check your PYTHONPATH environment variable.""")
    sys.exit(1)

try:
    import symbol
except:
    print("""Could not import the standard "symbol" module.  If this is
  a PC, you should add the dos_8x3 directory to your PYTHONPATH.""")
    sys.exit(1)

for dir in sys.path:
    file = os.path.join(dir, "os.py")
    if os.path.isfile(file):
        test = os.path.join(dir, "test")
        if os.path.isdir(test):
            # Add the "test" directory to PYTHONPATH.
            sys.path = sys.path + [test]

import libregrtest # Standard Python tester.
libregrtest.main()
back to top