[Zope-dev] inheritedAttribute - super

2005-09-27 Thread Florent Guillaume
Is there any problem if I change current Zope 2 trunk uses of  
inheritedAttribute into calls to super ?


Florent

--
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]


___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: SVN: Zope/branches/Zope-2_8-branch/ - Collector #1879: applied patch by Dieter Maurer to fix a bug in

2005-09-27 Thread Dieter Maurer
Florent Guillaume wrote at 2005-9-26 18:31 +0200:
This is the kind of thing that would *really* benefit from having unit
tests...

from Acquisition import Explicit
class A(Explicit): x = 1

...
def test_aq_acquire(self):
  ac = A()
  a = A().__of__(ac)
  self.assertEqual(a.aq_acquire('x'), 1)
  self.assertRaises(AttributeError, a.aq_acquire, 'y')
  self.assertEqual(a.aq_acquire('y', default=None), None)


Note, that aq_acquire has a lot more arguments -- not checked
by the above test (which checks just the fixed handling of the
argument default).


-- 
Dieter
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )