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.
2 files changed