[py-svn] r45535 - py/trunk/py/code

fijal at codespeak.net fijal at codespeak.net
Tue Aug 7 18:19:36 CEST 2007


Author: fijal
Date: Tue Aug  7 18:19:35 2007
New Revision: 45535

Modified:
   py/trunk/py/code/excinfo.py
Log:
Avoid hacks when creating exception name


Modified: py/trunk/py/code/excinfo.py
==============================================================================
--- py/trunk/py/code/excinfo.py	(original)
+++ py/trunk/py/code/excinfo.py	Tue Aug  7 18:19:35 2007
@@ -18,10 +18,7 @@
                     self._striptext = 'AssertionError: '
         self._excinfo = tup
         self.type, self.value, tb = self._excinfo
-        self.typename = str(self.type)
-        if issubclass(self.type, object):
-            # cpy 2.5
-            self.typename = self.typename[7:-2]
+        self.typename = self.type.__module__ + '.' + self.type.__name__
         self.traceback = py.code.Traceback(tb) 
 
     def exconly(self, tryshort=False): 



More information about the pytest-commit mailing list