mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Enable unittest.TestCase to be instantiated without providing a method name.
Changed unittestgui to show number of discovered tests in the status bar.
This commit is contained in:
parent
faa8c13ef4
commit
32e1d8340c
5 changed files with 30 additions and 5 deletions
|
@ -276,13 +276,15 @@ class TkTestRunner(BaseGUITestRunner):
|
|||
self.test_file_glob_pattern = d.test_file_glob_pattern
|
||||
|
||||
def notifyTestsDiscovered(self, test_suite):
|
||||
discovered = test_suite.countTestCases()
|
||||
self.runCountVar.set(0)
|
||||
self.failCountVar.set(0)
|
||||
self.errorCountVar.set(0)
|
||||
self.remainingCountVar.set(test_suite.countTestCases())
|
||||
self.remainingCountVar.set(discovered)
|
||||
self.progressBar.setProgressFraction(0.0)
|
||||
self.errorListbox.delete(0, tk.END)
|
||||
self.statusVar.set("Discovering tests from %s" % self.directory_to_read)
|
||||
self.statusVar.set("Discovering tests from %s. Found: %s" %
|
||||
(self.directory_to_read, discovered))
|
||||
self.stopGoButton['state'] = tk.NORMAL
|
||||
|
||||
def createWidgets(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue