wohlganger | 58fc71c | 2017-09-10 16:19:47 -0500 | [diff] [blame] | 1 | """codecontext - display the block context above the edit window |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 2 | |
Kurt B. Kaiser | 0a13579 | 2005-10-03 19:26:03 +0000 | [diff] [blame] | 3 | Once code has scrolled off the top of a window, it can be difficult to |
| 4 | determine which block you are in. This extension implements a pane at the top |
| 5 | of each IDLE edit window which provides block structure hints. These hints are |
| 6 | the lines which contain the block opening keywords, e.g. 'if', for the |
Cheryl Sabella | 29996a1 | 2018-06-01 19:23:00 -0400 | [diff] [blame] | 7 | enclosing block. The number of hint lines is determined by the maxlines |
Terry Jan Reedy | 6fa5bdc | 2016-05-28 13:22:31 -0400 | [diff] [blame] | 8 | variable in the codecontext section of config-extensions.def. Lines which do |
Kurt B. Kaiser | 0a13579 | 2005-10-03 19:26:03 +0000 | [diff] [blame] | 9 | not open blocks are not shown in the context hints pane. |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 10 | |
| 11 | """ |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 12 | import re |
Kurt B. Kaiser | 3536a5c | 2007-12-12 17:22:06 +0000 | [diff] [blame] | 13 | from sys import maxsize as INFINITY |
Terry Jan Reedy | bfbaa6b | 2016-08-31 00:50:55 -0400 | [diff] [blame] | 14 | |
| 15 | import tkinter |
Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి) | 43a74ab | 2018-11-10 12:15:31 +0530 | [diff] [blame] | 16 | from tkinter.constants import TOP, X, SUNKEN |
Terry Jan Reedy | bfbaa6b | 2016-08-31 00:50:55 -0400 | [diff] [blame] | 17 | |
Terry Jan Reedy | 6fa5bdc | 2016-05-28 13:22:31 -0400 | [diff] [blame] | 18 | from idlelib.config import idleConf |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 19 | |
Terry Jan Reedy | 049882e | 2014-12-11 05:33:36 -0500 | [diff] [blame] | 20 | BLOCKOPENERS = {"class", "def", "elif", "else", "except", "finally", "for", |
Terry Jan Reedy | d89ca94 | 2018-05-17 20:38:41 -0400 | [diff] [blame] | 21 | "if", "try", "while", "with", "async"} |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 22 | |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 23 | |
Cheryl Sabella | 8506016 | 2018-05-23 22:18:15 -0400 | [diff] [blame] | 24 | def get_spaces_firstword(codeline, c=re.compile(r"^(\s*)(\w*)")): |
| 25 | "Extract the beginning whitespace and first word from codeline." |
| 26 | return c.match(codeline).groups() |
| 27 | |
| 28 | |
| 29 | def get_line_info(codeline): |
| 30 | """Return tuple of (line indent value, codeline, block start keyword). |
| 31 | |
| 32 | The indentation of empty lines (or comment lines) is INFINITY. |
| 33 | If the line does not start a block, the keyword value is False. |
| 34 | """ |
| 35 | spaces, firstword = get_spaces_firstword(codeline) |
| 36 | indent = len(spaces) |
| 37 | if len(codeline) == indent or codeline[indent] == '#': |
| 38 | indent = INFINITY |
| 39 | opener = firstword in BLOCKOPENERS and firstword |
| 40 | return indent, codeline, opener |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 41 | |
wohlganger | 58fc71c | 2017-09-10 16:19:47 -0500 | [diff] [blame] | 42 | |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 43 | class CodeContext: |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 44 | "Display block context above the edit window." |
Tal Einat | 7036e1d | 2019-07-17 11:15:53 +0300 | [diff] [blame^] | 45 | UPDATEINTERVAL = 100 # millisec |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 46 | |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 47 | def __init__(self, editwin): |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 48 | """Initialize settings for context block. |
| 49 | |
| 50 | editwin is the Editor window for the context block. |
| 51 | self.text is the editor window text widget. |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 52 | |
Cheryl Sabella | b609e68 | 2018-06-04 11:58:44 -0400 | [diff] [blame] | 53 | self.context displays the code context text above the editor text. |
Cheryl Sabella | 8506016 | 2018-05-23 22:18:15 -0400 | [diff] [blame] | 54 | Initially None, it is toggled via <<toggle-code-context>>. |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 55 | self.topvisible is the number of the top text line displayed. |
| 56 | self.info is a list of (line number, indent level, line text, |
| 57 | block keyword) tuples for the block structure above topvisible. |
Cheryl Sabella | 8506016 | 2018-05-23 22:18:15 -0400 | [diff] [blame] | 58 | self.info[0] is initialized with a 'dummy' line which |
| 59 | starts the toplevel 'block' of the module. |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 60 | |
| 61 | self.t1 and self.t2 are two timer events on the editor text widget to |
Cheryl Sabella | 8506016 | 2018-05-23 22:18:15 -0400 | [diff] [blame] | 62 | monitor for changes to the context text or editor font. |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 63 | """ |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 64 | self.editwin = editwin |
| 65 | self.text = editwin.text |
Cheryl Sabella | b609e68 | 2018-06-04 11:58:44 -0400 | [diff] [blame] | 66 | self.context = None |
Kurt B. Kaiser | 0a13579 | 2005-10-03 19:26:03 +0000 | [diff] [blame] | 67 | self.topvisible = 1 |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 68 | self.info = [(0, -1, "", False)] |
Tal Einat | 7036e1d | 2019-07-17 11:15:53 +0300 | [diff] [blame^] | 69 | self.t1 = None |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 70 | |
wohlganger | 58fc71c | 2017-09-10 16:19:47 -0500 | [diff] [blame] | 71 | @classmethod |
| 72 | def reload(cls): |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 73 | "Load class variables from config." |
wohlganger | 58fc71c | 2017-09-10 16:19:47 -0500 | [diff] [blame] | 74 | cls.context_depth = idleConf.GetOption("extensions", "CodeContext", |
Tal Einat | 7036e1d | 2019-07-17 11:15:53 +0300 | [diff] [blame^] | 75 | "maxlines", type="int", |
| 76 | default=15) |
Terry Jan Reedy | a6bb313 | 2017-09-17 00:56:56 -0400 | [diff] [blame] | 77 | |
| 78 | def __del__(self): |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 79 | "Cancel scheduled events." |
Tal Einat | 7036e1d | 2019-07-17 11:15:53 +0300 | [diff] [blame^] | 80 | if self.t1 is not None: |
| 81 | try: |
| 82 | self.text.after_cancel(self.t1) |
| 83 | except tkinter.TclError: |
| 84 | pass |
| 85 | self.t1 = None |
wohlganger | 58fc71c | 2017-09-10 16:19:47 -0500 | [diff] [blame] | 86 | |
Kurt B. Kaiser | d00587a | 2004-04-24 03:08:13 +0000 | [diff] [blame] | 87 | def toggle_code_context_event(self, event=None): |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 88 | """Toggle code context display. |
| 89 | |
Cheryl Sabella | b609e68 | 2018-06-04 11:58:44 -0400 | [diff] [blame] | 90 | If self.context doesn't exist, create it to match the size of the editor |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 91 | window text (toggle on). If it does exist, destroy it (toggle off). |
| 92 | Return 'break' to complete the processing of the binding. |
| 93 | """ |
Tal Einat | 7036e1d | 2019-07-17 11:15:53 +0300 | [diff] [blame^] | 94 | if self.context is None: |
Thomas Wouters | cf297e4 | 2007-02-23 15:07:44 +0000 | [diff] [blame] | 95 | # Calculate the border width and horizontal padding required to |
| 96 | # align the context with the text in the main Text widget. |
Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 97 | # |
Serhiy Storchaka | 645058d | 2015-05-06 14:00:04 +0300 | [diff] [blame] | 98 | # All values are passed through getint(), since some |
Thomas Wouters | cf297e4 | 2007-02-23 15:07:44 +0000 | [diff] [blame] | 99 | # values may be pixel objects, which can't simply be added to ints. |
| 100 | widgets = self.editwin.text, self.editwin.text_frame |
Cheryl Sabella | 8506016 | 2018-05-23 22:18:15 -0400 | [diff] [blame] | 101 | # Calculate the required horizontal padding and border width. |
Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 102 | padx = 0 |
Cheryl Sabella | 8506016 | 2018-05-23 22:18:15 -0400 | [diff] [blame] | 103 | border = 0 |
Thomas Wouters | cf297e4 | 2007-02-23 15:07:44 +0000 | [diff] [blame] | 104 | for widget in widgets: |
Serhiy Storchaka | 645058d | 2015-05-06 14:00:04 +0300 | [diff] [blame] | 105 | padx += widget.tk.getint(widget.pack_info()['padx']) |
| 106 | padx += widget.tk.getint(widget.cget('padx')) |
Serhiy Storchaka | 645058d | 2015-05-06 14:00:04 +0300 | [diff] [blame] | 107 | border += widget.tk.getint(widget.cget('border')) |
Cheryl Sabella | b609e68 | 2018-06-04 11:58:44 -0400 | [diff] [blame] | 108 | self.context = tkinter.Text( |
Tal Einat | 7036e1d | 2019-07-17 11:15:53 +0300 | [diff] [blame^] | 109 | self.editwin.top, font=self.text['font'], |
| 110 | height=1, |
| 111 | width=1, # Don't request more than we get. |
| 112 | padx=padx, border=border, relief=SUNKEN, state='disabled') |
| 113 | self.update_highlight_colors() |
Cheryl Sabella | 041272b | 2018-06-08 01:21:15 -0400 | [diff] [blame] | 114 | self.context.bind('<ButtonRelease-1>', self.jumptoline) |
Cheryl Sabella | b609e68 | 2018-06-04 11:58:44 -0400 | [diff] [blame] | 115 | # Pack the context widget before and above the text_frame widget, |
Cheryl Sabella | 8506016 | 2018-05-23 22:18:15 -0400 | [diff] [blame] | 116 | # thus ensuring that it will appear directly above text_frame. |
Cheryl Sabella | b609e68 | 2018-06-04 11:58:44 -0400 | [diff] [blame] | 117 | self.context.pack(side=TOP, fill=X, expand=False, |
Tal Einat | 7036e1d | 2019-07-17 11:15:53 +0300 | [diff] [blame^] | 118 | before=self.editwin.text_frame) |
Cheryl Sabella | c1b4b0f | 2018-12-22 01:25:45 -0500 | [diff] [blame] | 119 | menu_status = 'Hide' |
Tal Einat | 7036e1d | 2019-07-17 11:15:53 +0300 | [diff] [blame^] | 120 | self.t1 = self.text.after(self.UPDATEINTERVAL, self.timer_event) |
Kurt B. Kaiser | d00587a | 2004-04-24 03:08:13 +0000 | [diff] [blame] | 121 | else: |
Cheryl Sabella | b609e68 | 2018-06-04 11:58:44 -0400 | [diff] [blame] | 122 | self.context.destroy() |
| 123 | self.context = None |
Tal Einat | 7036e1d | 2019-07-17 11:15:53 +0300 | [diff] [blame^] | 124 | self.text.after_cancel(self.t1) |
| 125 | self.t1 = None |
Cheryl Sabella | c1b4b0f | 2018-12-22 01:25:45 -0500 | [diff] [blame] | 126 | menu_status = 'Show' |
| 127 | self.editwin.update_menu_label(menu='options', index='* Code Context', |
| 128 | label=f'{menu_status} Code Context') |
Serhiy Storchaka | 213ce12 | 2017-06-27 07:02:32 +0300 | [diff] [blame] | 129 | return "break" |
Kurt B. Kaiser | d00587a | 2004-04-24 03:08:13 +0000 | [diff] [blame] | 130 | |
Kurt B. Kaiser | 0a13579 | 2005-10-03 19:26:03 +0000 | [diff] [blame] | 131 | def get_context(self, new_topvisible, stopline=1, stopindent=0): |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 132 | """Return a list of block line tuples and the 'last' indent. |
Kurt B. Kaiser | 0a13579 | 2005-10-03 19:26:03 +0000 | [diff] [blame] | 133 | |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 134 | The tuple fields are (linenum, indent, text, opener). |
| 135 | The list represents header lines from new_topvisible back to |
| 136 | stopline with successively shorter indents > stopindent. |
| 137 | The list is returned ordered by line number. |
| 138 | Last indent returned is the smallest indent observed. |
Kurt B. Kaiser | 7491022 | 2005-10-02 23:36:46 +0000 | [diff] [blame] | 139 | """ |
Kurt B. Kaiser | 0a13579 | 2005-10-03 19:26:03 +0000 | [diff] [blame] | 140 | assert stopline > 0 |
Kurt B. Kaiser | 7491022 | 2005-10-02 23:36:46 +0000 | [diff] [blame] | 141 | lines = [] |
Cheryl Sabella | 8506016 | 2018-05-23 22:18:15 -0400 | [diff] [blame] | 142 | # The indentation level we are currently in. |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 143 | lastindent = INFINITY |
| 144 | # For a line to be interesting, it must begin with a block opening |
| 145 | # keyword, and have less indentation than lastindent. |
Guido van Rossum | 805365e | 2007-05-07 22:24:25 +0000 | [diff] [blame] | 146 | for linenum in range(new_topvisible, stopline-1, -1): |
Cheryl Sabella | 8506016 | 2018-05-23 22:18:15 -0400 | [diff] [blame] | 147 | codeline = self.text.get(f'{linenum}.0', f'{linenum}.end') |
| 148 | indent, text, opener = get_line_info(codeline) |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 149 | if indent < lastindent: |
| 150 | lastindent = indent |
Kurt B. Kaiser | e3636e0 | 2004-04-26 22:26:04 +0000 | [diff] [blame] | 151 | if opener in ("else", "elif"): |
Cheryl Sabella | 8506016 | 2018-05-23 22:18:15 -0400 | [diff] [blame] | 152 | # Also show the if statement. |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 153 | lastindent += 1 |
Kurt B. Kaiser | 0a13579 | 2005-10-03 19:26:03 +0000 | [diff] [blame] | 154 | if opener and linenum < new_topvisible and indent >= stopindent: |
| 155 | lines.append((linenum, indent, text, opener)) |
Kurt B. Kaiser | 7491022 | 2005-10-02 23:36:46 +0000 | [diff] [blame] | 156 | if lastindent <= stopindent: |
| 157 | break |
| 158 | lines.reverse() |
| 159 | return lines, lastindent |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 160 | |
Kurt B. Kaiser | 0a13579 | 2005-10-03 19:26:03 +0000 | [diff] [blame] | 161 | def update_code_context(self): |
| 162 | """Update context information and lines visible in the context pane. |
| 163 | |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 164 | No update is done if the text hasn't been scrolled. If the text |
| 165 | was scrolled, the lines that should be shown in the context will |
Cheryl Sabella | b609e68 | 2018-06-04 11:58:44 -0400 | [diff] [blame] | 166 | be retrieved and the context area will be updated with the code, |
| 167 | up to the number of maxlines. |
Kurt B. Kaiser | 7491022 | 2005-10-02 23:36:46 +0000 | [diff] [blame] | 168 | """ |
Tal Einat | 7036e1d | 2019-07-17 11:15:53 +0300 | [diff] [blame^] | 169 | new_topvisible = self.editwin.getlineno("@0,0") |
Cheryl Sabella | 8506016 | 2018-05-23 22:18:15 -0400 | [diff] [blame] | 170 | if self.topvisible == new_topvisible: # Haven't scrolled. |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 171 | return |
Cheryl Sabella | 8506016 | 2018-05-23 22:18:15 -0400 | [diff] [blame] | 172 | if self.topvisible < new_topvisible: # Scroll down. |
Kurt B. Kaiser | 0a13579 | 2005-10-03 19:26:03 +0000 | [diff] [blame] | 173 | lines, lastindent = self.get_context(new_topvisible, |
| 174 | self.topvisible) |
Cheryl Sabella | 8506016 | 2018-05-23 22:18:15 -0400 | [diff] [blame] | 175 | # Retain only context info applicable to the region |
| 176 | # between topvisible and new_topvisible. |
Kurt B. Kaiser | 7491022 | 2005-10-02 23:36:46 +0000 | [diff] [blame] | 177 | while self.info[-1][1] >= lastindent: |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 178 | del self.info[-1] |
Cheryl Sabella | 8506016 | 2018-05-23 22:18:15 -0400 | [diff] [blame] | 179 | else: # self.topvisible > new_topvisible: # Scroll up. |
Kurt B. Kaiser | 7491022 | 2005-10-02 23:36:46 +0000 | [diff] [blame] | 180 | stopindent = self.info[-1][1] + 1 |
Cheryl Sabella | 8506016 | 2018-05-23 22:18:15 -0400 | [diff] [blame] | 181 | # Retain only context info associated |
| 182 | # with lines above new_topvisible. |
Kurt B. Kaiser | 0a13579 | 2005-10-03 19:26:03 +0000 | [diff] [blame] | 183 | while self.info[-1][0] >= new_topvisible: |
Kurt B. Kaiser | 7491022 | 2005-10-02 23:36:46 +0000 | [diff] [blame] | 184 | stopindent = self.info[-1][1] |
| 185 | del self.info[-1] |
Kurt B. Kaiser | 0a13579 | 2005-10-03 19:26:03 +0000 | [diff] [blame] | 186 | lines, lastindent = self.get_context(new_topvisible, |
| 187 | self.info[-1][0]+1, |
| 188 | stopindent) |
| 189 | self.info.extend(lines) |
| 190 | self.topvisible = new_topvisible |
Cheryl Sabella | 29996a1 | 2018-06-01 19:23:00 -0400 | [diff] [blame] | 191 | # Last context_depth context lines. |
| 192 | context_strings = [x[2] for x in self.info[-self.context_depth:]] |
| 193 | showfirst = 0 if context_strings[0] else 1 |
Cheryl Sabella | b609e68 | 2018-06-04 11:58:44 -0400 | [diff] [blame] | 194 | # Update widget. |
| 195 | self.context['height'] = len(context_strings) - showfirst |
| 196 | self.context['state'] = 'normal' |
| 197 | self.context.delete('1.0', 'end') |
| 198 | self.context.insert('end', '\n'.join(context_strings[showfirst:])) |
| 199 | self.context['state'] = 'disabled' |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 200 | |
Cheryl Sabella | 041272b | 2018-06-08 01:21:15 -0400 | [diff] [blame] | 201 | def jumptoline(self, event=None): |
| 202 | "Show clicked context line at top of editor." |
| 203 | lines = len(self.info) |
| 204 | if lines == 1: # No context lines are showing. |
| 205 | newtop = 1 |
| 206 | else: |
| 207 | # Line number clicked. |
| 208 | contextline = int(float(self.context.index('insert'))) |
| 209 | # Lines not displayed due to maxlines. |
| 210 | offset = max(1, lines - self.context_depth) - 1 |
| 211 | newtop = self.info[offset + contextline][0] |
| 212 | self.text.yview(f'{newtop}.0') |
| 213 | self.update_code_context() |
| 214 | |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 215 | def timer_event(self): |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 216 | "Event on editor text widget triggered every UPDATEINTERVAL ms." |
Tal Einat | 7036e1d | 2019-07-17 11:15:53 +0300 | [diff] [blame^] | 217 | if self.context is not None: |
Kurt B. Kaiser | 0a13579 | 2005-10-03 19:26:03 +0000 | [diff] [blame] | 218 | self.update_code_context() |
Tal Einat | 7036e1d | 2019-07-17 11:15:53 +0300 | [diff] [blame^] | 219 | self.t1 = self.text.after(self.UPDATEINTERVAL, self.timer_event) |
Kurt B. Kaiser | 54d1a3b | 2004-04-21 20:06:26 +0000 | [diff] [blame] | 220 | |
Tal Einat | 7036e1d | 2019-07-17 11:15:53 +0300 | [diff] [blame^] | 221 | def update_font(self, font): |
| 222 | if self.context is not None: |
| 223 | self.context['font'] = font |
| 224 | |
| 225 | def update_highlight_colors(self): |
| 226 | if self.context is not None: |
| 227 | colors = idleConf.GetHighlight(idleConf.CurrentTheme(), 'context') |
| 228 | self.context['background'] = colors['background'] |
| 229 | self.context['foreground'] = colors['foreground'] |
wohlganger | 58fc71c | 2017-09-10 16:19:47 -0500 | [diff] [blame] | 230 | |
| 231 | |
| 232 | CodeContext.reload() |
Cheryl Sabella | 654038d | 2018-05-19 15:34:03 -0400 | [diff] [blame] | 233 | |
| 234 | |
Terry Jan Reedy | 4d92158 | 2018-06-19 19:12:52 -0400 | [diff] [blame] | 235 | if __name__ == "__main__": |
| 236 | from unittest import main |
| 237 | main('idlelib.idle_test.test_codecontext', verbosity=2, exit=False) |
| 238 | |
| 239 | # Add htest. |