MCPcopy Index your code
hub / github.com/python/cpython / initGUI

Method initGUI

Tools/unittestgui/unittestgui.py:247–266  ·  view source on GitHub ↗

Set up the GUI inside the given root window. The test name entry field will be pre-filled with the given initialTestName.

(self, root, initialTestName)

Source from the content-addressed store, hash-verified

245 """An implementation of BaseGUITestRunner using Tkinter.
246 """
247 def initGUI(self, root, initialTestName):
248 """Set up the GUI inside the given root window. The test name entry
249 field will be pre-filled with the given initialTestName.
250 """
251 self.root = root
252
253 self.statusVar = tk.StringVar()
254 self.statusVar.set("Idle")
255
256 #tk vars for tracking counts of test result types
257 self.runCountVar = tk.IntVar()
258 self.failCountVar = tk.IntVar()
259 self.errorCountVar = tk.IntVar()
260 self.skipCountVar = tk.IntVar()
261 self.expectFailCountVar = tk.IntVar()
262 self.remainingCountVar = tk.IntVar()
263
264 self.top = tk.Frame()
265 self.top.pack(fill=tk.BOTH, expand=1)
266 self.createWidgets()
267
268 def getDirectoryToDiscover(self):
269 return filedialog.askdirectory()

Callers 1

__init__Method · 0.80

Calls 3

createWidgetsMethod · 0.95
setMethod · 0.45
packMethod · 0.45

Tested by

no test coverage detected