ó úŠ/Qc@sÑdZddlZddlmZddlmZddlmZddlmZddlmZddlm Z dd lm Z dd lm Z dd lm Z dd l mZd efd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZe eeƒdeefd „ƒYZe eeƒd!ejfd"„ƒYZd#„ZdS($sµTest interface declarations against ExtensionClass-like classes. These tests are to make sure we do something sane in the presence of classic ExtensionClass classes and instances. iÿÿÿÿN(todd(t Interface(t implementer(tdirectlyProvides(t providedBy(tdirectlyProvidedBy(tclassImplements(tclassImplementsOnly(t implementedBy(t_skip_under_py3ktI1cBseZRS((t__name__t __module__(((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR stI2cBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR !stI3cBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR"stI31cBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR#stI4cBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR$stI5cBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR%stOddcBseZejZRS((R R Rt MetaClasst __metaclass__(((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR'stBcBseZeZRS((R R R t__implemented__(((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR)stAcBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR2stCcBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR6stTestcBsVeZd„Zd„Zd„Zd„Zd„Zd„Zed„ƒZ d„Z RS(cCs |j|ƒS(N(t assertTrue(tselftexpr((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyt failUnless=scCs |j|ƒS(N(t assertFalse(RR((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pytfailIf@scCs)tƒ}t|tƒ|jgt|ƒD]}|jƒ^q)ddddgƒ|jgt|ƒjƒD]}|jƒ^qjddddddgƒ|jtt|ƒkƒ|j t t|ƒkƒ|jt|ƒj t ƒƒ|jt|ƒj t ƒƒ|j t|ƒj t ƒƒdttfd„ƒY}t|t ƒd |fd „ƒY}t|t ƒt|t ƒ|ƒ}t|tƒ|jgt|ƒD]}|jƒ^qdd dgƒ|jgt|ƒjƒD]}|jƒ^qÛdd dddgƒ|j tt|ƒkƒ|j t t|ƒkƒ|jt|ƒj t ƒƒ|j t|ƒj tƒƒ|jt|ƒj t ƒƒ|jt|ƒj t ƒƒdttfd „ƒY}d |fd „ƒY}t|t ƒt|t ƒ|ƒ}t|tƒ|jgt|ƒD]}|jƒ^qdd dgƒ|jgt|ƒjƒD]}|jƒ^qXdd dddgƒ|j tt|ƒkƒ|j t t|ƒkƒ|jt|ƒj t ƒƒ|j t|ƒj tƒƒ|jt|ƒj t ƒƒ|jt|ƒj t ƒƒdS(NRRR R RRtCOnlycBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR RstDcBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR!VsRcBseZeZRS((R R RR(((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR iscBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR!js(RRRt assertEqualRtgetNamet flattenedRR RRtextendsRRRRRR(RtctiR R!((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyttest_ObjectSpecificationCsX  (.     (.    (.cCs÷ttƒdtfd„ƒYƒ}ttƒdtfd„ƒYƒ}d||fd„ƒY}t|ttƒ|jgt|ƒD]}|j ƒ^q€ddd d gƒt|t ƒ|jgt|ƒD]}|j ƒ^qÈddd d d gƒdS( NRcBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR~sRcBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR‚sRcBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR†sR R RRR( RRRRRR R R"RR#R(RRRRR'((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyttest_classImplements|s  ( (cCs£ttƒdtfd„ƒYƒ}ttƒdtfd„ƒYƒ}d||fd„ƒY}t|ttƒ|jgt|ƒD]}|j ^q€ddgƒdS( NRcBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyRsRcBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR”sRcBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR˜sR R ( RRRRRR R R"RR (RRRRR'((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyttest_classImplementsOnlys  %c Cs dtfd„ƒY}dtfd„ƒY}dtfd„ƒY}dtfd„ƒY}d tfd „ƒY}t|||ƒd tfd „ƒY}t||ƒd ||fd„ƒY}t||ƒ|ƒ}t|ttƒ|jtt|ƒkƒ|jtt|ƒkƒ|j|t|ƒkƒ|j|t|ƒkƒ|j|t|ƒkƒ|j|t|ƒkƒt|t|ƒtƒ|jtt|ƒkƒ|j tt|ƒkƒ|j tt|ƒkƒt|t|ƒtƒ|jtt|ƒkƒdS(NtIA1cBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR+ stIA2cBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR,¡stIBcBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR-¢stICcBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR.£sRcBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR¤sRcBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR¨sRcBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR¬s( RRRRR R RRRR( RR+R,R-R.RRRtob((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyttest_directlyProvidesŸs0   cCs|jttttƒdS(N(t assertRaisest TypeErrorRRR(R((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyt)test_directlyProvides_fails_for_odd_classÁscCs•dtfd„ƒY}dtfd„ƒY}t||ƒd|fd„ƒY}t|tƒ|jgt|ƒD]}|jƒ^qoddgƒdS(NR cBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR ÑstC1cBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR4ÓstC2cBseZRS((R R (((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR5×sR(R RRRR"RR#(RR R4R5R'((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyttest_implementedByÐs  (( R R RRR(R)R*R0R R3R6(((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyR;s   9   "cCsHddl}tjƒ}|jtjtƒƒ|j|jtƒƒ|S(Niÿÿÿÿ(tdoctesttunittestt TestSuitetaddTestt makeSuiteRt DocTestSuiteR(R7tsuite((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyt test_suiteÞs   (t__doc__R8tzope.interface.testsRtzope.interfaceRRRRRRRRtzope.interface._compatR R R RRRRtobjectRRRRtTestCaseRR>(((sN/usr/lib/python2.7/dist-packages/zope/interface/tests/test_odd_declarations.pyts2    £