[Zope-Checkins] CVS: Zope3/utilities - unittestgui.py:1.1.2.4

Tres Seaver tseaver@zope.com
Wed, 21 Nov 2001 17:19:23 -0500


Update of /cvs-repository/Zope3/utilities
In directory cvs.zope.org:/tmp/cvs-serv5192/utilities

Modified Files:
      Tag: Zope-3x-branch
	unittestgui.py 
Log Message:
 - Further unit test cleanups.

=== Zope3/utilities/unittestgui.py 1.1.2.3 => 1.1.2.4 ===
 
 import string
+import re
 tk = Tkinter # Alternative to the messy 'from Tkinter import *' often seen
 
 
@@ -62,7 +63,9 @@
         "Override to display an error arising from GUI usage"
         pass
 
-    def runClicked(self):
+    def runClicked( self
+                  , COMMA_SPACE=re.compile( '[, ]+' )
+                  ):
         "To be called in response to user choosing to run a test"
         if self.running: return
         testName = self.getSelectedTestName()
@@ -73,7 +76,8 @@
             self.__rollbackImporter.rollbackImports()
         self.__rollbackImporter = RollbackImporter()
         try:
-            test = unittest.defaultTestLoader.loadTestsFromName(testName)
+            test = unittest.defaultTestLoader.loadTestsFromNames(
+                                COMMA_SPACE.split( testName ) )
         except:
             exc_type, exc_value, exc_tb = sys.exc_info()
             apply(traceback.print_exception,sys.exc_info())