[pypy-svn] rev 2492 - pypy/trunk/src/pypy/tool

sschwarzer at codespeak.net sschwarzer at codespeak.net
Thu Dec 18 14:10:58 CET 2003


Author: sschwarzer
Date: Thu Dec 18 14:10:58 2003
New Revision: 2492

Modified:
   pypy/trunk/src/pypy/tool/newtest.py
Log:
Return TestResult for failed setUp method.
Remove raise statement used for debugging.


Modified: pypy/trunk/src/pypy/tool/newtest.py
==============================================================================
--- pypy/trunk/src/pypy/tool/newtest.py	(original)
+++ pypy/trunk/src/pypy/tool/newtest.py	Thu Dec 18 14:10:58 2003
@@ -106,7 +106,7 @@
                 raise
             except:
                 result._setstatus(ERROR)
-                return
+                return result
 
             try:
                 testmethod()
@@ -199,7 +199,6 @@
                     items = self._items_from_module(module)
                 except:
                     print "skipping testfile (failed loading it)", modpath
-                    raise
                 else:
                     self.items.extend(items)
 
@@ -209,13 +208,18 @@
             yield item.run()
 
 
-if __name__ == '__main__':
+def main():
     ts = TestSuite()
-    ts.initfromdir(".")
+    ts.initfromdir(autopath.pypydir)
     for res in ts.testresults():
+        if res.status == SUCCESS:
+            continue
         print 75 * '-'
         print "%s: %s" % (res.item, res.status)
         if res.traceback:
-            print '-----'
+            print
             print res.formatted_traceback
 
+
+if __name__ == '__main__':
+    main()


More information about the Pypy-commit mailing list