+
    üÐjË  ã                   óÌ  € R t . ROt^ RIHtHtHtHtHt ^ RIH	t	H
t
HtHtHtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ]! R4      t ! R R]],          4      t]! R]],          R7      t]! ^ 4      ]! ^ 4      ]! ^ 4      ]! ^ 4      ]! ^ 4      ]! ^ 4      3R R llt ! R R]]],          ,          4      t ! R R]]],          ,          4      tR R lt R R lt!R# )z5
Hamcrest matchers useful throughout the test suite.
ÚHasSumÚIsSequenceOf)ÚAnyÚListÚSequenceÚTupleÚTypeVar)Úcontains_exactlyÚcontains_stringÚequal_toÚ
has_lengthÚhas_propertiesÚinstance_of)ÚBaseMatcher)ÚAllOf©ÚDescription)ÚMatcher)ÚProtocol)ÚFailureÚTc                   ó6   a € ] tR t^#t o RtV 3R lR ltRtV tR# )Ú	Semigroupzˆ
A type with an associative binary operator.

Common examples of a semigroup are integers with addition and strings with
concatenation.
c                ó&   <€ V ^8„  d   QhRS[ RS[ /# )é   ÚotherÚreturn)r   )ÚformatÚ__classdict__s   "€ÚC/usr/lib/python3/dist-packages/twisted/trial/_dist/test/matchers.pyÚ__annotate__ÚSemigroup.__annotate__+   s   ø€ ÷ ñ ™Qð ¡1ñ ó    c                ó   € R# )z6
This must be associative: a + (b + c) == (a + b) + c
N© )Úselfr   s   &&r   Ú__add__ÚSemigroup.__add__+   s   ‚ r"   r$   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r&   Ú__static_attributes__Ú__classdictcell__©r   s   @r   r   r   #   s   ø‡ € ñ÷ö r"   r   ÚS)Úboundc                ó  € V ^8„  d   QhR\         \        ,          R\         \        ,          R\         \        ,          R\         \        ,          R\         \        ,          R\         \        ,          R\         \        ,          /# )r   Ú	successesÚerrorsÚfailuresÚskipsÚexpectedFailuresÚunexpectedSuccessesr   )r   r   )r   s   "r   r    r    4   sj   € ÷ ñ Ü”s�|ðä”C�Lðô ”c�lðô ”3�<ð	ô
 œc•lðô !¤�ðô ŒS…\ñr"   c                ó0   € \        RV RVRVRVRVRV/4      # )z9
Match a L{TestCase} instances with matching attributes.
r3   r4   r5   r6   r7   r8   )r   )r3   r4   r5   r6   r7   r8   s   &&&&&&r   Úmatches_resultr:   4   s6   € ô à˜Ø�fØ˜Ø�UØÐ 0Ø!Ð#6ð	
ó	ð 	r"   c                   ó~   a € ] tR t^Kt o RtV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR	 ltV 3R
 lR lt	Rt
V tR# )r   z½
Match a sequence the elements of which sum to a value matched by
another matcher.

@ivar sumMatcher: The matcher which must match the sum.
@ivar zero: The zero value for the matched type.
c                ó:   <€ V ^8„  d   QhRS[ S[,          RS[RR/# )r   Ú
sumMatcherÚzeror   N)r   r0   )r   r   s   "€r   r    ÚHasSum.__annotate__T   s&   ø€ ÷ ñ ¡7©1¥:ð ±Qð ¸4ñ r"   c                ó   € Wn         W n        R # ©N©r=   r>   )r%   r=   r>   s   &&&r   Ú__init__ÚHasSum.__init__T   s   € Ø$ŒØŽ	r"   c                ó6   <€ V ^8„  d   QhRS[ S[,          RS[/# )r   Úsequencer   )r   r0   )r   r   s   "€r   r    r?   X   s   ø€ ÷ ñ ™X¡a�[ð ©Qñ r"   c                óh   € V'       g   V P                   # V P                   pV F  pW#,           pK  	  V# rA   )r>   )r%   rF   ÚresultÚelems   &&  r   Ú_sumÚHasSum._sumX   s.   € ßØ—9‘9ÐØ—‘ˆÛˆDØ•]ŠFñ àˆr"   c                ó6   <€ V ^8„  d   QhRS[ S[,          RS[/# ©r   Úitemr   )r   r0   Úbool)r   r   s   "€r   r    r?   `   s   ø€ ÷ *ñ *™X¡a�[ð *©Tñ *r"   c                óZ   € V P                  V4      pV P                  P                  V4      # )z7
Determine whether the sum of the sequence is matched.
)rJ   r=   Úmatches)r%   rN   Úss   && r   Ú_matchesÚHasSum._matches`   s&   € ð �I‰I�d‹OˆØ�‰×&Ñ& qÓ)Ð)r"   c                ó:   <€ V ^8„  d   QhRS[ S[,          RS[RR/# ©r   rN   Údescriptionr   N)r   r0   r   )r   r   s   "€r   r    r?   g   s'   ø€ ÷ ñ ¡h©q¥kð Áð ÐPTñ r"   c                ó€   € V P                  V4      pVP                  V 4       V P                  P                  W24       R# )ú
Describe the mismatch.
N)rJ   Úappend_description_ofr=   Údescribe_mismatch)r%   rN   rW   rR   s   &&& r   r[   ÚHasSum.describe_mismatchg   s4   € ð �I‰I�d‹OˆØ×)Ñ)¨$Ô/Ø�‰×)Ñ)¨!Ô9Ùr"   c                ó$   <€ V ^8„  d   QhRS[ RR/# ©r   rW   r   Nr   )r   r   s   "€r   r    r?   p   ó   ø€ ÷ &ñ &¡{ð &°tñ &r"   c                ó€   € VP                  R4       VP                  V P                  4       VP                  R4       R# )ú+
Describe this matcher for error messages.
za sequence with sum ú, N)Úappend_textrZ   r=   ©r%   rW   s   &&r   Údescribe_toÚHasSum.describe_top   s3   € ð 	×ÑÐ 6Ô7Ø×)Ñ)¨$¯/©/Ô:Ø×Ñ Ö%r"   rB   N)r(   r)   r*   r+   r,   rC   rJ   rS   r[   re   r-   r.   r/   s   @r   r   r   K   s<   ø‡ € ñ÷ð ÷ð ÷*ð *÷ð ÷&ö &r"   c                   ól   a € ] tR t^yt o RtV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR	 ltR
t	V t
R# )r   zœ
Match a sequence where every element is matched by another matcher.

@ivar elementMatcher: The matcher which must match every element of the
    sequence.
c                ó4   <€ V ^8„  d   QhRS[ S[,          RR/# )r   ÚelementMatcherr   N)r   r   )r   r   s   "€r   r    ÚIsSequenceOf.__annotate__�   s   ø€ ÷ -ñ -¡w©q¥zð -°dñ -r"   c                ó   € Wn         R # rA   ©ri   )r%   ri   s   &&r   rC   ÚIsSequenceOf.__init__�   s   € Ø,Ör"   c                ó6   <€ V ^8„  d   QhRS[ S[,          RS[/# rM   )r   r   rO   )r   r   s   "€r   r    rj   „   s   ø€ ÷ ñ ™X¡a�[ð ©Tñ r"   c                ó`   € V F'  pV P                   P                  V4      '       d   K&   R# 	  R# )z=
Determine whether every element of the sequence is matched.
FT)ri   rQ   )r%   rN   rI   s   && r   rS   ÚIsSequenceOf._matches„   s-   € ó ˆDØ×&Ñ&×.Ñ.¨t×4Ô4Úñ ñ r"   c                ó:   <€ V ^8„  d   QhRS[ S[,          RS[RR/# rV   )r   r   r   )r   r   s   "€r   r    rj   �   s,   ø€ ÷ Vñ V¡h©q¥kð VÁð VÐPTñ Vr"   c                óÆ   € \        V4       FQ  w  r4V P                  P                  V4      '       d   K(  VP                  V 4       VP	                  RV RV: 24       KS  	  R# )rY   znot sequence with element #Ú N)Ú	enumerateri   rQ   rZ   rc   )r%   rN   rW   ÚidxrI   s   &&&  r   r[   ÚIsSequenceOf.describe_mismatch�   sU   € ô # 4ž‰IˆCØ×&Ñ&×.Ñ.¨t×4Ô4Ø×1Ñ1°$Ô7Ø×'Ñ'Ð*EÀcÀUÈ!ÈDÉ8Ð(TÖUó )r"   c                ó$   <€ V ^8„  d   QhRS[ RR/# r^   r   )r   r   s   "€r   r    rj   –   r_   r"   c                ó€   € VP                  R4       VP                  V P                  4       VP                  R4       R# )ra   za sequence containing only rb   N)rc   rZ   ri   rd   s   &&r   re   ÚIsSequenceOf.describe_to–   s5   € ð 	×ÑÐ =Ô>Ø×)Ñ)¨$×*=Ñ*=Ô>Ø×Ñ Ö%r"   rl   N)r(   r)   r*   r+   r,   rC   rS   r[   re   r-   r.   r/   s   @r   r   r   y   s4   ø‡ € ñ÷-ð -÷ð ÷Vð V÷&ö &r"   c                ó\   € V ^8„  d   QhR\         \        ,          R\         \        ,          /# )r   Ú
propertiesr   )r   Úobject)r   s   "r   r    r    Ÿ   s"   € ÷ ñ œG¤F�Oð ´¼µñ r"   c                 óF   € \        \        \        4      \        R/ V B 4      # )z;
Match an instance of L{Failure} with matching attributes.
r$   )r   r   r   r   )r{   s   ,r   Ú	isFailurer~   Ÿ   s$   € ô Ü”GÓÜÑ$˜Ñ$óð r"   c                óÔ   € V ^8„  d   QhR\         R\         R\        \        \        \         \         \        \
        \        ,          \
        \        ,          3,          ,          ,          /# )r   ÚfunctionNameÚfileNamer   )Ústrr   r   r   Úintr   r|   )r   s   "r   r    r    ©   sF   € ÷ ñ ÜðÜ!$ðäŒX”eœC¤¤c¬4´­<¼¼f½ÐEÕFÕGÕHñr"   c           	     ó‚   € \        \        V 4      \        V4      \        \        4      \        ^ 4      \        ^ 4      4      # )z_
Match a tuple representation of a frame like those used by
L{twisted.python.failure.Failure}.
)r	   r   r
   r   rƒ   r   )r€   r�   s   &&r   ÚsimilarFramer…   ©   s9   € ô Ü�ÓÜ˜Ó!Ü”CÓô 	�1‹Ü�1‹óð r"   N)r:   r   r   )"r,   Ú__all__Útypingr   r   r   r   r   Úhamcrestr	   r
   r   r   r   r   Úhamcrest.core.base_matcherr   Úhamcrest.core.core.allofr   Úhamcrest.core.descriptionr   Úhamcrest.core.matcherr   r   Útwisted.python.failurer   r   r   r0   r:   r   r   r~   r…   r$   r"   r   Ú<module>rŽ      sÉ   ðñò€÷ 7Õ 6÷÷ õ 3Ý *Ý 1Ý )Ý å *áˆCƒL€ô�˜•ô ñ ˆC�y •~Ô&€ñ ' q›kÙ% a›=Ù'¨›]Ù$ Q›-Ù%/°£]Ù(2°1«÷ô.+&ˆ[˜ !�Õ%ô +&ô\#&�;˜x¨�{Õ+ô #&õL÷r"   