[Zodb-checkins] SVN: ZODB/trunk/src/ZODB/tests/testcrossdatabasereferences.py Include extra data in InvalidObjectReference exceptions to make

Jim Fulton jim at zope.com
Thu Apr 30 07:43:47 EDT 2009


Log message for revision 99603:
  Include extra data in InvalidObjectReference exceptions to make
  debugging easier.
  

Changed:
  U   ZODB/trunk/src/ZODB/tests/testcrossdatabasereferences.py

-=-
Modified: ZODB/trunk/src/ZODB/tests/testcrossdatabasereferences.py
===================================================================
--- ZODB/trunk/src/ZODB/tests/testcrossdatabasereferences.py	2009-04-30 11:43:45 UTC (rev 99602)
+++ ZODB/trunk/src/ZODB/tests/testcrossdatabasereferences.py	2009-04-30 11:43:47 UTC (rev 99603)
@@ -52,11 +52,14 @@
     >>> p2 = MyClass()
     >>> conn2.root()['p'] = p2
     >>> p2.p1 = p1
-    >>> tm.commit() # doctest: +NORMALIZE_WHITESPACE
+    >>> tm.commit() # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
     Traceback (most recent call last):
     ...
-    InvalidObjectReference: Attempt to store a reference to an object
-    from a separate connection to the same database or multidatabase
+    InvalidObjectReference:
+    ('Attempt to store a reference to an object from a separate connection to
+    the same database or multidatabase',
+    <Connection at ...>,
+    <ZODB.tests.testcrossdatabasereferences.MyClass object at ...>)
 
     >>> tm.abort()
 
@@ -68,11 +71,14 @@
     >>> p2 = MyClass()
     >>> conn2.root()['p'] = p2
     >>> p2.p1 = p1
-    >>> tm.commit() # doctest: +NORMALIZE_WHITESPACE
+    >>> tm.commit() # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
     Traceback (most recent call last):
     ...
-    InvalidObjectReference: Attempt to store a reference to an object
-    from a separate connection to the same database or multidatabase
+    InvalidObjectReference:
+    ('Attempt to store a reference to an object from a separate connection
+    to the same database or multidatabase',
+    <Connection at ...>,
+    <ZODB.tests.testcrossdatabasereferences.MyClass object at ...>)
 
     >>> tm.abort()
 



More information about the Zodb-checkins mailing list