[issue30393] test_readline hangs

wmayner report at bugs.python.org
Tue May 30 11:58:47 EDT 2017


wmayner added the comment:

Output of `./python3 -m unittest -v test.test_readline`:

testHistoryUpdates (test.test_readline.TestHistoryManipulation) ... ok
test_nonascii_history (test.test_readline.TestHistoryManipulation) ... ok
test_write_read_append (test.test_readline.TestHistoryManipulation) ... ok
test_auto_history_disabled (test.test_readline.TestReadline) ...

I then found by commenting-out tests that it hangs if and only if `run_pty` is called, so it seems that your hunch is probably right.

I compiled without `--enable-optimizations` and the same tests hang. Compiling with that option runs the whole test suite, which revealed the problem, but it doesn't seem to be related.

Here's the KeyboardInterrupt trace:

estHistoryUpdates (test.test_readline.TestHistoryManipulation) ... ok
test_nonascii_history (test.test_readline.TestHistoryManipulation) ... ok
test_write_read_append (test.test_readline.TestHistoryManipulation) ... ok
test_auto_history_disabled (test.test_readline.TestReadline) ... ^CTraceback (most recent call last):
  File "/home/will/python3.6.1/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/will/python3.6.1/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/will/python3.6.1/lib/python3.6/unittest/__main__.py", line 18, in <module>
    main(module=None)
  File "/home/will/python3.6.1/lib/python3.6/unittest/main.py", line 94, in __init__
    self.runTests()
  File "/home/will/python3.6.1/lib/python3.6/unittest/main.py", line 255, in runTests
    self.result = testRunner.run(self.test)
  File "/home/will/python3.6.1/lib/python3.6/unittest/runner.py", line 176, in run
    test(result)
  File "/home/will/python3.6.1/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/home/will/python3.6.1/lib/python3.6/unittest/suite.py", line 122, in run
    test(result)
  File "/home/will/python3.6.1/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/home/will/python3.6.1/lib/python3.6/unittest/suite.py", line 122, in run
    test(result)
  File "/home/will/python3.6.1/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/home/will/python3.6.1/lib/python3.6/unittest/suite.py", line 122, in run
    test(result)
  File "/home/will/python3.6.1/lib/python3.6/unittest/case.py", line 649, in __call__
    return self.run(*args, **kwds)
  File "/home/will/python3.6.1/lib/python3.6/unittest/case.py", line 601, in run
    testMethod()
  File "/home/will/python3.6.1/lib/python3.6/test/test_readline.py", line 136, in test_auto_history_disabled
    output = run_pty(self.auto_history_script.format(False))
  File "/home/will/python3.6.1/lib/python3.6/test/test_readline.py", line 240, in run_pty
    for [_, events] in sel.select():
  File "/home/will/python3.6.1/lib/python3.6/selectors.py", line 323, in select
    r, w, _ = self._select(self._readers, self._writers, [], timeout)
KeyboardInterrupt

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30393>
_______________________________________


More information about the Python-bugs-list mailing list