[pypy-svn] r11785 - pypy/dist/lib-python

hpk at codespeak.net hpk at codespeak.net
Mon May 2 16:42:36 CEST 2005


Author: hpk
Date: Mon May  2 16:42:36 2005
New Revision: 11785

Modified:
   pypy/dist/lib-python/conftest.py
   pypy/dist/lib-python/result.py
Log:
get rid of print and introduce a helper method 
for error lines 



Modified: pypy/dist/lib-python/conftest.py
==============================================================================
--- pypy/dist/lib-python/conftest.py	(original)
+++ pypy/dist/lib-python/conftest.py	Mon May  2 16:42:36 2005
@@ -731,7 +731,6 @@
     def run(self): 
         l = []
         for x in self.testmap: 
-            print x.core
             if ((not not x.core) ^ (pypy_option.noncore)) or pypy_option.withall: 
                 l.append(x.basename) 
         return l 

Modified: pypy/dist/lib-python/result.py
==============================================================================
--- pypy/dist/lib-python/result.py	(original)
+++ pypy/dist/lib-python/result.py	Mon May  2 16:42:36 2005
@@ -33,6 +33,13 @@
     def getnamedtext(self, name): 
         return self._blocks[name]
 
+    def repr_short_error(self): 
+        if not self.isok(): 
+            text = self.getnamedtext('stderr') 
+            lines = text.strip().split('\n')
+            if lines: 
+                return lines[-1]
+
     def repr_mimemessage(self): 
         from email.MIMEMultipart  import MIMEMultipart 
         from email.MIMEText  import MIMEText



More information about the Pypy-commit mailing list