[Zope-Checkins] SVN: Zope/branches/2.12/src/OFS/tests/testObjectManager.py Remove other pointless tests of Python's instance attr semantics.
Tres Seaver
tseaver at palladion.com
Thu Feb 9 18:02:35 UTC 2012
Log message for revision 124356:
Remove other pointless tests of Python's instance attr semantics.
Changed:
U Zope/branches/2.12/src/OFS/tests/testObjectManager.py
-=-
Modified: Zope/branches/2.12/src/OFS/tests/testObjectManager.py
===================================================================
--- Zope/branches/2.12/src/OFS/tests/testObjectManager.py 2012-02-09 17:11:57 UTC (rev 124355)
+++ Zope/branches/2.12/src/OFS/tests/testObjectManager.py 2012-02-09 18:02:34 UTC (rev 124356)
@@ -409,42 +409,18 @@
si1 = SimpleItem('1')
om['1'] = si1
self.failUnless(('1', si1) in om.items())
- # A contained item overwrites the method
- self.failUnless(hasattr(om.items, 'im_func'))
- om.__dict__['items'] = si1
- self.failUnless(aq_base(om.items) is si1)
- self.failUnless(aq_base(om['items']) is si1)
- # Once the object is gone, the method is back
- del om['items']
- self.failUnless(hasattr(om.items, 'im_func'))
def test_keys(self):
om = self._makeOne()
si1 = SimpleItem('1')
om['1'] = si1
self.failUnless('1' in om.keys())
- # A contained item overwrites the method
- self.failUnless(hasattr(om.keys, 'im_func'))
- om.__dict__['keys'] = si1
- self.failUnless(aq_base(om.keys) is si1)
- self.failUnless(aq_base(om['keys']) is si1)
- # Once the object is gone, the method is back
- del om['keys']
- self.failUnless(hasattr(om.keys, 'im_func'))
def test_values(self):
om = self._makeOne()
si1 = SimpleItem('1')
om['1'] = si1
self.failUnless(si1 in om.values())
- # A contained item overwrites the method
- self.failUnless(hasattr(om.values, 'im_func'))
- om.__dict__['values'] = si1
- self.failUnless(aq_base(om.values) is si1)
- self.failUnless(aq_base(om['values']) is si1)
- # Once the object is gone, the method is back
- del om['values']
- self.failUnless(hasattr(om.values, 'im_func'))
def test_list_imports(self):
om = self._makeOne()
More information about the Zope-Checkins
mailing list