[Zodb-checkins] CVS: ZODB/src/persistent/tests - test_overriding_attrs.py:1.1.2.4

Fred L. Drake, Jr. fred at zope.com
Wed Feb 18 18:09:17 EST 2004


Update of /cvs-repository/ZODB/src/persistent/tests
In directory cvs.zope.org:/tmp/cvs-serv13912

Modified Files:
      Tag: zope3-zodb3-devel-branch
	test_overriding_attrs.py 
Log Message:
special-case __getnewargs__ so we don't mess with the basic
persistence machinery in evil ways


=== ZODB/src/persistent/tests/test_overriding_attrs.py 1.1.2.3 => 1.1.2.4 ===
--- ZODB/src/persistent/tests/test_overriding_attrs.py:1.1.2.3	Fri Feb 13 23:38:53 2004
+++ ZODB/src/persistent/tests/test_overriding_attrs.py	Wed Feb 18 18:09:17 2004
@@ -74,7 +74,10 @@
 
         >>> db.close()
         """
-        return name.upper(), self._p_changed
+        if name == "__getnewargs__":
+            raise AttributeError, name
+        else:
+            return name.upper(), self._p_changed
 
 class SampleOverridingGetattributeSetattrAndDelattr(Persistent):
     """Example of overriding __getattribute__, __setattr__, and __delattr__




More information about the Zodb-checkins mailing list