Ë
    ò¦1hÓ  ã                   ó4  — d Z ddlZddlZddlZddlmZmZ 	 ddlmZ ej                  j                  d«      Zej                  j                  d«      Zedk7  xr edk7  Zej                  j!                  e d¬	«       G d
„ de«      «       Zy# e$ r dZY Œ6w xY w)a  This file contains test cases reported by third parties using
fuzzing tools, primarily from Google's oss-fuzz project. Some of these
represent real problems with Beautiful Soup, but many are problems in
libraries that Beautiful Soup depends on, and many of the test cases
represent different ways of triggering the same problem.

Grouping these test cases together makes it easy to see which test
cases represent the same problem, and puts the test cases in close
proximity to code that can trigger the problems.
é    N)ÚBeautifulSoupÚParserRejectedMarkup)ÚSelectorSyntaxErrorÚlxmlÚhtml5libFz/Prerequisites for fuzz tests are not installed.©Úreasonc                   óZ  — e Zd ZdZdeddfd„Zej                  j                  dddg«      d„ «       Z	ej                  j                  dg d	¢«      d
„ «       Z
ej                  j                  dg d¢«      d„ «       Zej                  j                  dddg«      d„ «       Zej                  j                  d¬«      ej                  j                  dg d¢«      d„ «       «       Zej                  j                  d¬«      ej                  j                  ddg«      d„ «       «       Zdedefd„Zy)ÚTestFuzzz	.testcaseÚfilenameÚreturnNc                 óº  — | j                  |«      }g d¢}	 t        |d   «      t        |«      z  }|dd |dd  }}	 t	        |dd  ||   ¬«      }t        |j                  d«      «       	 |j                  j                  |j                  dd«      «       |j                  «        y # t        $ r Y y w xY w# t
        $ r Y y t        $ r Y y w xY w# t        $ r Y y w xY w)	N)zlxml-xmlr   úhtml.parserr   r   é   é
   )ÚfeaturesTzutf-8Úreplace)Ú_TestFuzz__markupÚintÚlenÚ
ValueErrorr   r   ÚlistÚfind_allÚcssÚselectÚdecoder   Úprettify)Úselfr   ÚdataÚparsersÚidxÚcss_selectorÚsoups          úQ/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/bs4/tests/test_fuzz.pyÚfuzz_test_with_csszTestFuzz.fuzz_test_with_css-   sç   € Ø�}‰}˜XÓ&ˆÚAˆð	Ü�d˜1‘g“,¤ W£Ñ-ˆCð " ! B˜Z¨¨b¨c¨�dˆð	Ü   a b °G¸C±LÔAˆDô 	ˆT�]‰]˜4Ó Ô!ð	Ø�H‰H�O‰O˜L×/Ñ/°¸ÓCÔDð 	�‰�øô# ò 	Ùð	ûô $ò 	ÙÜò 	Ùð	ûô #ò 	Ùð	ús:   —B& ¼B5 Á*+C Â&	B2Â1B2Â5	CÃ CÃ
CÃ	CÃCz:clusterfuzz-testcase-minimized-bs4_fuzzer-5703933063462912z.crash-ffbdfa8a2b26f13537b68d3794b0478a4090ee4ac                 óš   — | j                  |«      }t        j                  t        «      5  t	        |d«       d d d «       y # 1 sw Y   y xY w©Nr   )r   ÚpytestÚraisesr   r   ©r   r   Úmarkups      r$   Útest_rejected_markupzTestFuzz.test_rejected_markupH   s>   € ð —‘˜xÓ(ˆÜ�]‰]Ô/Ó0ñ 	1Ü˜& -Ô0÷	1÷ 	1ñ 	1ús   «AÁA
)z:clusterfuzz-testcase-minimized-bs4_fuzzer-5984173902397440z:clusterfuzz-testcase-minimized-bs4_fuzzer-5167584867909632z:clusterfuzz-testcase-minimized-bs4_fuzzer-6124268085182464z:clusterfuzz-testcase-minimized-bs4_fuzzer-6450958476902400c                 óZ   — | j                  |«      }t        |d«      j                  «        y r'   )r   r   Úencoder*   s      r$   Ú'test_deeply_nested_document_without_cssz0TestFuzz.test_deeply_nested_document_without_css[   s%   € ð —‘˜xÓ(ˆÜ�f˜mÓ,×3Ñ3Õ5ó    )z:clusterfuzz-testcase-minimized-bs4_fuzzer-5000587759190016z:clusterfuzz-testcase-minimized-bs4_fuzzer-5375146639360000z:clusterfuzz-testcase-minimized-bs4_fuzzer-5492400320282624c                 ó&   — | j                  |«       y ©N©r%   ©r   r   s     r$   Útest_deeply_nested_documentz$TestFuzz.test_deeply_nested_documento   ó   € ð 	×Ñ Õ)r0   z:clusterfuzz-testcase-minimized-bs4_fuzzer-4670634698080256z:clusterfuzz-testcase-minimized-bs4_fuzzer-5270998950477824c                 ó&   — | j                  |«       y r2   r3   r4   s     r$   Útest_soupsieve_errorszTestFuzz.test_soupsieve_errorsz   s   € ð 	×Ñ Õ)r0   zhtml5lib-specific problemsr   )z:clusterfuzz-testcase-minimized-bs4_fuzzer-4818336571064320z:clusterfuzz-testcase-minimized-bs4_fuzzer-4999465949331456z:clusterfuzz-testcase-minimized-bs4_fuzzer-5843991618256896z:clusterfuzz-testcase-minimized-bs4_fuzzer-6241471367348224z:clusterfuzz-testcase-minimized-bs4_fuzzer-6600557255327744z.crash-0d306a50c8ed8bcd0785b67000fcd5dea1d33f08c                 ól   — | j                  |«      }t        t        |d«      j                  «       «       y )Nr   )r   Úprintr   r.   r*   s      r$   Ú&test_html5lib_parse_errors_without_cssz/TestFuzz.test_html5lib_parse_errors_without_css‹   s*   € ð& —‘˜xÓ(ˆÜŒm˜F JÓ/×6Ñ6Ó8Õ9r0   z:clusterfuzz-testcase-minimized-bs4_fuzzer-6306874195312640c                 ó&   — | j                  |«       y r2   r3   r4   s     r$   Útest_html5lib_parse_errorsz#TestFuzz.test_html5lib_parse_errors¥   r6   r0   c                 ó  — |j                  | j                  «      s|| j                  z  }t        j                  j	                  t
        «      d   }t        j                  j                  |d|«      }t        |d«      j                  «       S )Nr   ÚfuzzÚrb)	ÚendswithÚTESTCASE_SUFFIXÚosÚpathÚsplitÚ__file__ÚjoinÚopenÚread)r   r   Úthis_dirrD   s       r$   Ú__markupzTestFuzz.__markup°   si   € Ø× Ñ  ×!5Ñ!5Ô6Ø˜×,Ñ,Ñ,ˆHÜ—7‘7—=‘=¤Ó*¨1Ñ-ˆÜ�w‰w�|‰|˜H f¨hÓ7ˆÜ�D˜$Ó×$Ñ$Ó&Ð&r0   )Ú__name__Ú
__module__Ú__qualname__rB   Ústrr%   r(   ÚmarkÚparametrizer,   r/   r5   r8   Úskipr;   r=   Úbytesr   © r0   r$   r   r      sy  „ ð "€Oð¨3ð °4ó ð6 ‡[�[×ÑØàHØ<ð	
óñ1óð1ð ‡[�[×ÑØò	
óñ6óð6ð ‡[�[×ÑØò	
óñ*óð*ð ‡[�[×ÑØàHØHð	
óñ*óð*ð ‡[�[×ÑÐ9ÐÓ:Ø‡[�[×ÑØò	
óñ":ó#ó ;ð$:ð ‡[�[×ÑÐ9ÐÓ:Ø‡[�[×ÑØð Ið	
óñ*óó ;ð*ð' ð '¨ô 'r0   r   )Ú__doc__rC   Ú	importlibr(   Úbs4r   r   Úsoupsieve.utilr   ÚutilÚ	find_specÚhas_lxmlÚhas_html5libÚfully_fuzzableÚImportErrorrP   ÚskipifÚobjectr   rT   r0   r$   ú<module>ra      s¯   ðñ	ó 
Û Û ÷ð
Ý2Ø�~‰~×'Ñ'¨Ó/€HØ—>‘>×+Ñ+¨JÓ7€LØ Ñ%Ò>¨,¸$Ñ*>€Nð
 ‡�×ÑØÐÐPð ó ôU'ˆvó U'óñU'øð ò Ø‚Nðús   ˜AB ÂBÂB