ó
2(Vc           @   sj   d  Z  d d l Z d „  Z d e j f d „  ƒ  YZ d e j f d „  ƒ  YZ d e j f d	 „  ƒ  YZ d S(
   s&    zope.interface.exceptions unit tests
iÿÿÿÿNc          C   s*   d d l  m }  d |  f d „  ƒ  Y} | S(   Niÿÿÿÿ(   t	   Interfacet   IDummyc           B   s   e  Z RS(    (   t   __name__t
   __module__(    (    (    sH   /usr/lib/python2.7/dist-packages/zope/interface/tests/test_exceptions.pyR      s   (   t   zope.interfaceR    (   R    R   (    (    sH   /usr/lib/python2.7/dist-packages/zope/interface/tests/test_exceptions.pyt
   _makeIface   s    t   DoesNotImplementTestsc           B   s&   e  Z d  „  Z d d „ Z d „  Z RS(   c         C   s   d d l  m } | S(   Niÿÿÿÿ(   t   DoesNotImplement(   t   zope.interface.exceptionsR   (   t   selfR   (    (    sH   /usr/lib/python2.7/dist-packages/zope/interface/tests/test_exceptions.pyt   _getTargetClass   s    c         C   s(   | d  k r t ƒ  } n  |  j ƒ  | ƒ S(   N(   t   NoneR   R
   (   R	   t   iface(    (    sH   /usr/lib/python2.7/dist-packages/zope/interface/tests/test_exceptions.pyt   _makeOne   s    c         C   s&   |  j  ƒ  } |  j t | ƒ d ƒ d  S(   Nsm   An object does not implement interface <InterfaceClass zope.interface.tests.test_exceptions.IDummy>

        (   R   t   assertEqualt   str(   R	   t   dni(    (    sH   /usr/lib/python2.7/dist-packages/zope/interface/tests/test_exceptions.pyt   test___str__#   s    N(   R   R   R
   R   R   R   (    (    (    sH   /usr/lib/python2.7/dist-packages/zope/interface/tests/test_exceptions.pyR      s   	t   BrokenImplementationTestsc           B   s)   e  Z d  „  Z d d d „ Z d „  Z RS(   c         C   s   d d l  m } | S(   Niÿÿÿÿ(   t   BrokenImplementation(   R   R   (   R	   R   (    (    sH   /usr/lib/python2.7/dist-packages/zope/interface/tests/test_exceptions.pyR
   ,   s    t   missingc         C   s+   | d  k r t ƒ  } n  |  j ƒ  | | ƒ S(   N(   R   R   R
   (   R	   R   t   name(    (    sH   /usr/lib/python2.7/dist-packages/zope/interface/tests/test_exceptions.pyR   0   s    c         C   s&   |  j  ƒ  } |  j t | ƒ d ƒ d  S(   Ns¢   An object has failed to implement interface <InterfaceClass zope.interface.tests.test_exceptions.IDummy>

        The missing attribute was not provided.
        (   R   R   R   (   R	   R   (    (    sH   /usr/lib/python2.7/dist-packages/zope/interface/tests/test_exceptions.pyR   5   s    N(   R   R   R
   R   R   R   (    (    (    sH   /usr/lib/python2.7/dist-packages/zope/interface/tests/test_exceptions.pyR   *   s   	t   BrokenMethodImplementationTestsc           B   s)   e  Z d  „  Z d d d „ Z d „  Z RS(   c         C   s   d d l  m } | S(   Niÿÿÿÿ(   t   BrokenMethodImplementation(   R   R   (   R	   R   (    (    sH   /usr/lib/python2.7/dist-packages/zope/interface/tests/test_exceptions.pyR
   ?   s    t   aMethods	   I said soc         C   s   |  j  ƒ  | | ƒ S(   N(   R
   (   R	   t   methodt   mess(    (    sH   /usr/lib/python2.7/dist-packages/zope/interface/tests/test_exceptions.pyR   C   s    c         C   s&   |  j  ƒ  } |  j t | ƒ d ƒ d  S(   NsW   The implementation of aMethod violates its contract
        because I said so.
        (   R   R   R   (   R	   R   (    (    sH   /usr/lib/python2.7/dist-packages/zope/interface/tests/test_exceptions.pyR   F   s    (   R   R   R
   R   R   (    (    (    sH   /usr/lib/python2.7/dist-packages/zope/interface/tests/test_exceptions.pyR   =   s   	(   t   __doc__t   unittestR   t   TestCaseR   R   R   (    (    (    sH   /usr/lib/python2.7/dist-packages/zope/interface/tests/test_exceptions.pyt   <module>   s
   	