8000 bpo-29854: Print readline version information when running test suite by berkerpeksag · Pull Request #2618 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-29854: Print readline version information when running test suite #2618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from 1 commit
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
Next Next commit
Print readline version information when running test suite
  • Loading branch information
berkerpeksag committed Jul 7, 2017
commit 73eede891f9caa8c21247bbf69a7f62c657dfbbb
8 changes: 8 additions & 0 deletions Lib/test/libregrtest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,14 @@ def display_header(self):
print("== encodings: locale=%s, FS=%s"
% (locale.getpreferredencoding(False),
sys.getfilesystemencoding()))
try:
import readline
except ImportError:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use sys.exit(1) to not try to decode empty stdout in the parent process.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

readline = None
if readline is not None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line just can be an "else:" no?

print(f"== readline version: {readline._READLINE_VERSION:#06x}")
is_editline = readline.__doc__ and "libedit" in readline.__doc__
print("== readline implementation:", "editline" if is_editline else "GNU readline")
print("Testing with flags:", sys.flags)

def run_tests(self):
Expand Down
0