mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Issue #18081: Workaround "./python -m test_idle test_logging" failure
"import idlelib" should not install hooks on the warning modules, hooks should only be installed when IDLE is started.
This commit is contained in:
parent
7660b880a5
commit
b28a375f2f
2 changed files with 6 additions and 3 deletions
|
@ -40,7 +40,6 @@ else:
|
|||
s += " %s\n" % line
|
||||
s += "%s: %s\n" % (category.__name__, message)
|
||||
return s
|
||||
warnings.formatwarning = idle_formatwarning_subproc
|
||||
|
||||
|
||||
tcl = tkinter.Tcl()
|
||||
|
@ -82,6 +81,9 @@ def main(del_exitfunc=False):
|
|||
global exit_now
|
||||
global quitting
|
||||
global no_exitfunc
|
||||
|
||||
warnings.formatwarning = idle_formatwarning_subproc
|
||||
|
||||
no_exitfunc = del_exitfunc
|
||||
#time.sleep(15) # test subprocess not responding
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue