[Zope-Checkins] CVS: Zope - test.py:1.6

Jeremy Hylton jeremy at zope.com
Tue Mar 16 00:21:52 EST 2004


Update of /cvs-repository/Zope
In directory cvs.zope.org:/tmp/cvs-serv28645

Modified Files:
	test.py 
Log Message:
Simplify.

Uniform handling of errors is get_suite() allows this code to be
simplified.


=== Zope/test.py 1.5 => 1.6 ===
--- Zope/test.py:1.5	Mon Mar 15 23:59:07 2004
+++ Zope/test.py	Tue Mar 16 00:21:51 2004
@@ -487,18 +487,10 @@
     modname = finder.module_from_path(file)
     try:
         mod = package_import(modname)
-    except ImportError, err:
-        result.addError(PseudoTestCase(modname), sys.exc_info())
-        return None
-    try:
-        suite_func = mod.test_suite
+        return mod.test_suite()
     except AttributeError:
         result.addError(PseudoTestCase(modname), sys.exc_info())
         return None
-    try:
-        return suite_func()
-    except:
-        result.addError(PseudoTestCase(modname), sys.exc_info())
 
 def filter_testcases(s, rx):
     new = unittest.TestSuite()




More information about the Zope-Checkins mailing list