Ë
    ojÝ  ã                   ó–   — d Z ddlmZmZmZmZmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZmZmZ ddlmZ ddlmZ d	d
lmZ  G d„ de«      Zy)z+
Tests for L{twisted.trial.test.matchers}.
é    )ÚanythingÚassert_thatÚcontains_stringÚequal_toÚnot_)ÚAllOf)ÚStringDescription)Úgiven)ÚjustÚsampled_fromÚtext)ÚFilePath)ÚSynchronousTestCaseé   )ÚfileContentsc                   ó¢   — e Zd ZdZ e e«        ed«      «      dededdfd„«       Z e ed«       e	g d	¢«      «      dededdfd
„«       Z
dd„Zy)ÚFileContentsTestsz$
    Tests for L{fileContents}.
    úutf-8ÚcontentsÚencodingÚreturnNc                 ó4  — t        | j                  «       «      }|j                  |j                  |«      «       t	        «       }t        t        t        |«      «      j                  ||«      t        d«      «       t        t        |«      t        d«      «       y)ah  
        L{fileContents} matches a L{IFilePath} that refers to a file that
        contains a string that is matched by the parameterized matcher.

        :param contents: The text string to place in the file and match
            against.

        :param encoding: The text encoding to use to encode C{contents} when
            writing to the file.
        TÚ N)
r   ÚmktempÚ
setContentÚencoder	   r   r   r   ÚmatchesÚstr©Úselfr   r   ÚpÚdescriptions        úB/usr/lib/python3/dist-packages/twisted/trial/test/test_matchers.pyÚtest_matcheszFileContentsTests.test_matches   sn   € ô �T—[‘[“]Ó#ˆØ	�‰�X—_‘_ XÓ.Ô/ä'Ó)ˆÜÜœ (Ó+Ó,×4Ñ4°Q¸ÓDÄhÈtÃnô	
ô 	”C˜Ó$¤h¨r£lÕ3ó    z!some text, it doesn't matter what)Úasciizlatin-1r   c                 óL  — t        | j                  «       «      }|j                  |j                  |«      «       t	        «       }t        t        t        t        «       «      «      j                  ||«      t        d«      «       t        t        |«      t        d|› d�«      «       y)a|  
        L{fileContents} does not match an L{IFilePath} that refers to a
        file that contains a string that is not matched by the parameterized
        matcher.

        :param contents: The text string to place in the file and match
            against.

        :param encoding: The text encoding to use to encode C{contents} when
            writing to the file.
        Fzwas <ú>N)r   r   r   r   r	   r   r   r   r   r   r   r   r   s        r#   Útest_mismatchesz!FileContentsTests.test_mismatches)   sy   € ô  �T—[‘[“]Ó#ˆØ	�‰�X—_‘_ XÓ.Ô/ä'Ó)ˆÜÜœœh›jÓ)Ó*×2Ñ2°1°kÓBÄHÈUÃOô	
ô 	”C˜Ó$¤h°°q°c¸¨|Ó&<Õ=r%   c                 óR  — t        | j                  «       «      }t        «       }t        t	        t        «       «      j                  ||«      t        d«      «       t        t        |«      t        t        d«      t        d«      t        t        |j                  «      «      «      «       y)zq
        L{fileContents} reports details of any I/O error encountered while
        attempting to match.
        Fr   ÚFileNotFoundErrorN)r   r   r	   r   r   r   r   r   r   r   r   ÚreprÚpath)r    r!   r"   s      r#   Útest_ioerrorzFileContentsTests.test_ioerrorB   sy   € ô
 �T—[‘[“]Ó#ˆä'Ó)ˆÜ”L¤£Ó,×4Ñ4°Q¸ÓDÄhÈuÃoÔVÜÜ�Óää Ó/äÐ 3Ó4ô  ¤ Q§V¡V£Ó-óõ	
r%   )r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r   r   r$   r   r)   r.   © r%   r#   r   r      s‚   „ ññ ‰4‹6‘4˜“=Ó!ð4 Sð 4°Cð 4¸Dò 4ó "ð4ñ( ÙÐ0Ó1ÙÒ2Ó3óð>¨ð >°sð >¸tò >ó	ð>ô*
r%   r   N)r2   Úhamcrestr   r   r   r   r   Úhamcrest.core.core.allofr   Ú hamcrest.core.string_descriptionr	   Ú
hypothesisr
   Úhypothesis.strategiesr   r   r   Útwisted.python.filepathr   Útwisted.trial.unittestr   Úmatchersr   r   r3   r%   r#   ú<module>r<      s:   ðñ÷ LÕ KÝ *Ý >Ý ß :Ñ :å ,Ý 6Ý "ôH
Ð+õ H
r%   