diff options
author | Nadeem Vawda <nadeem.vawda@gmail.com> | 2013-01-27 13:17:21 (GMT) |
---|---|---|
committer | Nadeem Vawda <nadeem.vawda@gmail.com> | 2013-01-27 13:17:21 (GMT) |
commit | ef0a44c629b84036edee5b4513159299993a7524 (patch) | |
tree | d7ace88f7328eaca5014bd647875dc350699b57d /Lib/test/test_builtin.py | |
parent | 07c71365244ce496042566d94bdd469f7d3b1bf6 (diff) | |
parent | 60cc32382f0a568723da8cb3c1b3fc532ab41d58 (diff) | |
download | cpython-ef0a44c629b84036edee5b4513159299993a7524.zip cpython-ef0a44c629b84036edee5b4513159299993a7524.tar.gz cpython-ef0a44c629b84036edee5b4513159299993a7524.tar.bz2 |
Issue #13886: Fix input() to not strip out supposedly-invalid input bytes.
Also fix sporadic failures in test_builtin due to dependence on whether the
readline module has previously been imported.
Diffstat (limited to 'Lib/test/test_builtin.py')
-rw-r--r-- | Lib/test/test_builtin.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 036f4f2..9b14838 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -20,6 +20,13 @@ try: import pty, signal except ImportError: pty = signal = None +# Importing this module has the side-effect of changing the behavior of input(). +# Ensure that we always use the readline version (if available), so we don't get +# different results depending on what other tests have already imported. +try: + import readline +except ImportError: + pass class Squares: |