Staging
v0.5.1
https://github.com/python/cpython
Revision fde0041089de2d13e7c473200fb74d3956203987 authored by Miss Islington (bot) on 18 February 2020, 03:05:14 UTC, committed by GitHub on 18 February 2020, 03:05:14 UTC

Test when find_good_parse_start should return 0.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit ffda25f6b825f3dee493b6f0746266a4dd6989f0)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
1 parent 3c57ca6
Raw File
Tip revision: fde0041089de2d13e7c473200fb74d3956203987 authored by Miss Islington (bot) on 18 February 2020, 03:05:14 UTC
bpo-39663: IDLE: Add additional tests for pyparse (GH-18536)
Tip revision: fde0041
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