summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/stackviewer.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2018-06-22 02:19:56 (GMT)
committerGitHub <noreply@github.com>2018-06-22 02:19:56 (GMT)
commitbcd3a1a18d841338f57c39f6a7de8cf14d0c3e03 (patch)
treeda436501bb737d5ffd1db96f2fdf6e0904115dcb /Lib/idlelib/stackviewer.py
parent419e88d18ccc83e182afca124d42f46794022aab (diff)
downloadcpython-bcd3a1a18d841338f57c39f6a7de8cf14d0c3e03.zip
cpython-bcd3a1a18d841338f57c39f6a7de8cf14d0c3e03.tar.gz
cpython-bcd3a1a18d841338f57c39f6a7de8cf14d0c3e03.tar.bz2
bpo-33905: Add test for idlelib.stackview.StackBrowser. (GH-7852)
Increases coverage by 44%.
Diffstat (limited to 'Lib/idlelib/stackviewer.py')
-rw-r--r--Lib/idlelib/stackviewer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/idlelib/stackviewer.py b/Lib/idlelib/stackviewer.py
index 71cfb78..94ffb4e 100644
--- a/Lib/idlelib/stackviewer.py
+++ b/Lib/idlelib/stackviewer.py
@@ -8,6 +8,7 @@ from idlelib.debugobj import ObjectTreeItem, make_objecttreeitem
from idlelib.tree import TreeNode, TreeItem, ScrolledCanvas
def StackBrowser(root, flist=None, tb=None, top=None):
+ global sc, item, node # For testing.
if top is None:
top = tk.Toplevel(root)
sc = ScrolledCanvas(top, bg="white", highlightthickness=0)
@@ -134,7 +135,6 @@ def _stack_viewer(parent): # htest #
intentional_name_error
except NameError:
exc_type, exc_value, exc_tb = sys.exc_info()
-
# inject stack trace to sys
sys.last_type = exc_type
sys.last_value = exc_value
@@ -149,7 +149,7 @@ def _stack_viewer(parent): # htest #
if __name__ == '__main__':
from unittest import main
- main('idlelib.idle_test.test_stackviewer', verbosity=2)
+ main('idlelib.idle_test.test_stackviewer', verbosity=2, exit=False)
from idlelib.idle_test.htest import run
run(_stack_viewer)