Skip to content

test_pyrepl: test_cursor_back_write() blocks on input_hook() when tests are run sequentially#121008

@vstinner

Description

@vstinner

Command:

$ ./python -m test -u all,-gui (...) 0:24:10 load avg: 0.92 [326/478] test_pyclbr 0:24:13 load avg: 0.92 [327/478] test_pyexpat 0:24:13 load avg: 0.92 [328/478] test_pyrepl 

gdb:

(gdb) where #0 0x00007f3b0325ec37 in select () from /lib64/libc.so.6 #1 0x00007f3af40f4497 in Sleep (milli=<optimized out>) at ./Modules/_tkinter.c:371 #2 0x00007f3af40f4faa in EventHook () at ./Modules/_tkinter.c:3350 #3 0x0000000000666d86 in os__inputhook_impl (module=<optimized out>) at ./Modules/posixmodule.c:16795 #4 0x0000000000666dad in os__inputhook (module=<optimized out>, _unused_ignored=_unused_ignored@entry=0x0) at ./Modules/clinic/posixmodule.c.h:12134 (...) (gdb) py-bt Traceback (most recent call first): <built-in method _inputhook of module object at remote 0x7f3af53d9850> File "/home/vstinner/python/main/Lib/_pyrepl/reader.py", line 719, in handle1 input_hook() File "/home/vstinner/python/main/Lib/test/test_pyrepl/support.py", line 75, in handle_all_events reader.handle1() File "/home/vstinner/python/main/Lib/test/test_pyrepl/test_unix_console.py", line 197, in test_cursor_back_write _, con = handle_events_unix_console(events) File "/home/vstinner/python/main/Lib/unittest/mock.py", line 1423, in patched return func(*newargs, **newkeywargs) File "/home/vstinner/python/main/Lib/unittest/case.py", line 606, in _callTestMethod result = method() File "/home/vstinner/python/main/Lib/unittest/case.py", line 660, in run self._callTestMethod(testMethod) (...) 

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions