[py-svn] r57178 - in py/branch/event/py/code: . testing

hpk at codespeak.net hpk at codespeak.net
Sun Aug 10 19:54:35 CEST 2008


Author: hpk
Date: Sun Aug 10 19:54:34 2008
New Revision: 57178

Modified:
   py/branch/event/py/code/excinfo.py
   py/branch/event/py/code/testing/test_excinfo.py
Log:
i think the type.__name__ is enough for "typename"


Modified: py/branch/event/py/code/excinfo.py
==============================================================================
--- py/branch/event/py/code/excinfo.py	(original)
+++ py/branch/event/py/code/excinfo.py	Sun Aug 10 19:54:34 2008
@@ -23,7 +23,7 @@
                     self._striptext = 'AssertionError: '
         self._excinfo = tup
         self.type, self.value, tb = self._excinfo
-        self.typename = self.type.__module__ + '.' + self.type.__name__
+        self.typename = self.type.__name__
         self.traceback = py.code.Traceback(tb) 
 
     def __repr__(self):

Modified: py/branch/event/py/code/testing/test_excinfo.py
==============================================================================
--- py/branch/event/py/code/testing/test_excinfo.py	(original)
+++ py/branch/event/py/code/testing/test_excinfo.py	Sun Aug 10 19:54:34 2008
@@ -195,7 +195,7 @@
 def test_excinfo_repr():
     excinfo = py.test.raises(ValueError, h)
     s = repr(excinfo)
-    assert s == "<ExceptionInfo exceptions.ValueError tblen=4>"
+    assert s == "<ExceptionInfo ValueError tblen=4>"
 
 def test_excinfo_str():
     excinfo = py.test.raises(ValueError, h)
@@ -549,7 +549,7 @@
         assert tw.lines[7] == ">       raise ValueError(x)"
         assert tw.lines[8] == "E       ValueError: 3"
         assert tw.lines[9] == ""
-        assert tw.lines[10].endswith("mod.py:3: exceptions.ValueError")
+        assert tw.lines[10].endswith("mod.py:3: ValueError")
 
 
     def test_format_excinfo(self):



More information about the pytest-commit mailing list