diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2016-08-16 04:10:14 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2016-08-16 04:10:14 (GMT) |
commit | f35bb9e1e93cf7d8af377b2b28e6ecea7b1a2606 (patch) | |
tree | ccbb84a98a8e23bd46c97748b0c7d0cb219b60e3 /Lib/idlelib | |
parent | ee454a0dfca95f679ef2ba5a1d35bebf9e486106 (diff) | |
download | cpython-f35bb9e1e93cf7d8af377b2b28e6ecea7b1a2606.zip cpython-f35bb9e1e93cf7d8af377b2b28e6ecea7b1a2606.tar.gz cpython-f35bb9e1e93cf7d8af377b2b28e6ecea7b1a2606.tar.bz2 |
Issue #27611, #24137: Only change tkinter when easily restored.
Diffstat (limited to 'Lib/idlelib')
-rwxr-xr-x | Lib/idlelib/pyshell.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py index 28584ac..740c72e 100755 --- a/Lib/idlelib/pyshell.py +++ b/Lib/idlelib/pyshell.py @@ -30,6 +30,7 @@ import linecache from code import InteractiveInterpreter from platform import python_version, system +from idlelib import testing from idlelib.editor import EditorWindow, fixwordbreaks from idlelib.filelist import FileList from idlelib.colorizer import ColorDelegator @@ -1448,8 +1449,9 @@ def main(): enable_edit = enable_edit or edit_start enable_shell = enable_shell or not enable_edit - # Setup root. - if use_subprocess: # Don't break user code run in IDLE process + # Setup root. Don't break user code run in IDLE process. + # Don't change environment when testing. + if use_subprocess and not testing: NoDefaultRoot() root = Tk(className="Idle") root.withdraw() |