[py-svn] r57397 - py/release/0.9.x/py/test

hpk at codespeak.net hpk at codespeak.net
Mon Aug 18 12:05:47 CEST 2008


Author: hpk
Date: Mon Aug 18 12:05:46 2008
New Revision: 57397

Modified:
   py/release/0.9.x/py/test/representation.py
Log:
make the parseable location of errors be as brief as possible.


Modified: py/release/0.9.x/py/test/representation.py
==============================================================================
--- py/release/0.9.x/py/test/representation.py	(original)
+++ py/release/0.9.x/py/test/representation.py	Mon Aug 18 12:05:46 2008
@@ -123,8 +123,12 @@
             # filename and lineno output for each entry,
             # using an output format that most editors unterstand
             loc = "%s:%d:" %(entry.path, entry.lineno+1)
+            try:
+                msg = excinfo.type.__name__ 
+            except AttributeError:
+                msg = excinfo.typename # can be longer
             if entry == last:
-                loc += " %r" % excinfo.exconly()
+                loc += " %s" % msg 
             self.out.line(loc)
             self.repr_locals(entry.locals)
 



More information about the pytest-commit mailing list