[Zope-Checkins] CVS: Zope3/lib/python/Zope/Exceptions/tests - testExceptionFormatter.py:1.1.2.2

Shane Hathaway shane@cvs.zope.org
Thu, 14 Mar 2002 17:48:33 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/Exceptions/tests
In directory cvs.zope.org:/tmp/cvs-serv29492/tests

Modified Files:
      Tag: Zope-3x-branch
	testExceptionFormatter.py 
Log Message:
- Fixed line endings.

- Replaced ITraceback.manageable_object with source_url, which moves
  dependencies on computing URLs out to code where exceptions occur.


=== Zope3/lib/python/Zope/Exceptions/tests/testExceptionFormatter.py 1.1.2.1 => 1.1.2.2 ===
     t, v, b = sys.exc_info()
     try:
-        return '\n'.join(format_exception(t, v, b, as_html))
+        return ''.join(format_exception(t, v, b, as_html))
     finally:
         del b
 
@@ -41,7 +41,7 @@
 
 class TestingTracebackSupplement:
 
-    manageable_object = wrapper.Wrapper(object(), name='wrapped_mo')
+    source_url = '/somepath'
     line = 634
     column = 57
     warnings = ['Repent, for the end is nigh']
@@ -75,8 +75,8 @@
             raise ExceptionForTesting
         except ExceptionForTesting:
             s = tb(as_html)
-            # The path to the object
-            self.assert_(s.find('wrapped_mo') >= 0, s)
+            # The source URL
+            self.assert_(s.find('/somepath') >= 0, s)
             # The line number
             self.assert_(s.find('634') >= 0, s)
             # The column number