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:
Michael Foord 2011-01-03 17:00:11 +00:00
parent faa8c13ef4
commit 32e1d8340c
5 changed files with 30 additions and 5 deletions

View file

@ -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):