SVN: Zope/trunk/src/OFS/tests/testObjectManager.py Remove other pointless tests of Python's instance attr semantics.

Tres Seaver <[email protected]> Thu, 9 Feb 2012 13:04:21 -0500 (EST)
Newsgroups gmane.comp.web.zope.cvs
Message-ID <20120209180421.977FE7083BC__26501.3431701393$1328810670$gmane$org@cvs.zope.org>
Log message for revision 124358:
  Remove other pointless tests of Python's instance attr semantics.

Changed:
  U   Zope/trunk/src/OFS/tests/testObjectManager.py

-=-
Modified: Zope/trunk/src/OFS/tests/testObjectManager.py
===================================================================
--- Zope/trunk/src/OFS/tests/testObjectManager.py	2012-02-09 18:04:15 UTC (rev 124357)
+++ Zope/trunk/src/OFS/tests/testObjectManager.py	2012-02-09 18:04:21 UTC (rev 124358)
@@ -434,42 +434,18 @@
         si1 = SimpleItem('1')
         om['1'] = si1
         self.assertTrue(('1', si1) in om.items())
-        # A contained item overwrites the method
-        self.assertTrue(hasattr(om.items, 'im_func'))
-        om.__dict__['items'] = si1
-        self.assertTrue(aq_base(om.items) is si1)
-        self.assertTrue(aq_base(om['items']) is si1)
-        # Once the object is gone, the method is back
-        del om['items']
-        self.assertTrue(hasattr(om.items, 'im_func'))
 
     def test_keys(self):
         om = self._makeOne()
         si1 = SimpleItem('1')
         om['1'] = si1
         self.assertTrue('1' in om.keys())
-        # A contained item overwrites the method
-        self.assertTrue(hasattr(om.keys, 'im_func'))
-        om.__dict__['keys'] = si1
-        self.assertTrue(aq_base(om.keys) is si1)
-        self.assertTrue(aq_base(om['keys']) is si1)
-        # Once the object is gone, the method is back
-        del om['keys']
-        self.assertTrue(hasattr(om.keys, 'im_func'))
 
     def test_values(self):
         om = self._makeOne()
         si1 = SimpleItem('1')
         om['1'] = si1
         self.assertTrue(si1 in om.values())
-        # A contained item overwrites the method
-        self.assertTrue(hasattr(om.values, 'im_func'))
-        om.__dict__['values'] = si1
-        self.assertTrue(aq_base(om.values) is si1)
-        self.assertTrue(aq_base(om['values']) is si1)
-        # Once the object is gone, the method is back
-        del om['values']
-        self.assertTrue(hasattr(om.values, 'im_func'))
 
     def test_list_imports(self):
         om = self._makeOne()

_______________________________________________
Zope-Checkins maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-checkins