Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions 18 Lib/test/libregrtest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import platform
import random
import re
import subprocess
import sys
import sysconfig
import tempfile
Expand Down Expand Up @@ -432,6 +433,23 @@ def display_header(self):
print("== encodings: locale=%s, FS=%s"
% (locale.getpreferredencoding(False),
sys.getfilesystemencoding()))
rl_version_cmd = textwrap.dedent("""
import sys
try:
import readline
except ImportError:
sys.exit(1)
else:
def get_rl_info():
is_editline = readline.__doc__ and "libedit" in readline.__doc__
return f"{readline._READLINE_VERSION:#06x}", "editline" if is_editline else "GNU readline"
rl_version, rl_implementation = get_rl_info()
print(f"== readline: version {rl_version} ({rl_implementation})", end="")
""")
rl_output = subprocess.run([sys.executable, "-c", rl_version_cmd],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if rl_output.returncode == 0:
print(rl_output.stdout.decode())
print("Testing with flags:", sys.flags)

def run_tests(self):
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.