§
    ÈtºfÝ  ã                   óž   — 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dS )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dS )ÚFileContentsTestsz$
    Tests for L{fileContents}.
    úutf-8ÚcontentsÚencodingÚreturnNc                 óž  — t          |                      ¦   «         ¦  «        }|                     |                     |¦  «        ¦  «         t	          ¦   «         }t          t          t          |¦  «        ¦  «                             ||¦  «        t          d¦  «        ¦  «         t          t          |¦  «        t          d¦  «        ¦  «         dS )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        ú_/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/trial/test/test_matchers.pyÚtest_matcheszFileContentsTests.test_matches   s¥   € õ �T—[’[‘]”]Ñ#Ô#ˆØ	�Š�X—_’_ XÑ.Ô.Ñ/Ô/Ð/å'Ñ)Ô)ˆÝÝ� (Ñ+Ô+Ñ,Ô,×4Ò4°Q¸ÑDÔDÅhÈtÁnÄnñ	
ô 	
ð 	
õ 	•C˜Ñ$Ô$¥h¨r¡l¤lÑ3Ô3Ð3Ð3Ð3ó    z!some text, it doesn't matter what)Úasciizlatin-1r   c                 ó¾  — t          |                      ¦   «         ¦  «        }|                     |                     |¦  «        ¦  «         t	          ¦   «         }t          t          t          t          ¦   «         ¦  «        ¦  «         	                    ||¦  «        t          d¦  «        ¦  «         t          t          |¦  «        t          d|› d�¦  «        ¦  «         dS )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)   s³   € õ  �T—[’[‘]”]Ñ#Ô#ˆØ	�Š�X—_’_ XÑ.Ô.Ñ/Ô/Ð/å'Ñ)Ô)ˆÝÝ��h™jœjÑ)Ô)Ñ*Ô*×2Ò2°1°kÑBÔBÅHÈUÁOÄOñ	
ô 	
ð 	
õ 	•C˜Ñ$Ô$¥h¨|°q¨|¨|¨|Ñ&<Ô&<Ñ=Ô=Ð=Ð=Ð=r%   c                 óÂ  — t          |                      ¦   «         ¦  «        }t          ¦   «         }t          t	          t          ¦   «         ¦  «                             ||¦  «        t          d¦  «        ¦  «         t          t          |¦  «        t          t          d¦  «        t          d¦  «        t          t          |j        ¦  «        ¦  «        ¦  «        ¦  «         dS )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   s¶   € õ
 �T—[’[‘]”]Ñ#Ô#ˆå'Ñ)Ô)ˆÝ•L¥¡¤Ñ,Ô,×4Ò4°Q¸ÑDÔDÅhÈuÁoÄoÑVÔVÐVÝÝ�ÑÔåå Ñ/Ô/åÐ 3Ñ4Ô4õ  ¥ Q¤V¡¤Ñ-Ô-ñô ñ	
ô 	
ð 	
ð 	
ð 	
r%   )r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r   r   r$   r   r)   r.   © r%   r#   r   r      sè   € € € € € ðð ð €Uˆ4ˆ4‰6Œ6�4�4˜‘=”=Ñ!Ô!ð4 Sð 4°Cð 4¸Dð 4ð 4ð 4ñ "Ô!ð4ð( €UØˆÐ0Ñ1Ô1ØˆÐ2Ð2Ð2Ñ3Ô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Ð KÐ KÐ KÐ KÐ KÐ KÐ KÐ KÐ KÐ KÐ KÐ KØ *Ð *Ð *Ð *Ð *Ð *Ø >Ð >Ð >Ð >Ð >Ð >Ø Ð Ð Ð Ð Ð Ø :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :à ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø 6Ð 6Ð 6Ð 6Ð 6Ð 6Ø "Ð "Ð "Ð "Ð "Ð "ðH
ð H
ð H
ð H
ð H
Ð+ñ H
ô H
ð H
ð H
ð H
r%   