§
     Mºf<  ã                   óÊ   — d Z ddlZddlZddlmZmZ 	 ddlmZ ddlZddl	Z	dZ
n# e$ r dZ
Y nw xY wej                             e
 d¬¦  «         G d	„ d
e¦  «        ¦   «         ZdS )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)ÚSelectorSyntaxErrorTFz/Prerequisites for fuzz tests are not installed.©Úreasonc                   óh  — e Zd ZdZd„ Zej                             dddg¦  «        d„ ¦   «         Zej                             dg d¢¦  «        d„ ¦   «         Z	ej                             dg d	¢¦  «        d
„ ¦   «         Z
ej                             dddg¦  «        d„ ¦   «         Zej                             d¬¦  «        ej                             dg d¢¦  «        d„ ¦   «         ¦   «         Zej                             d¬¦  «        ej                             ddg¦  «        d„ ¦   «         ¦   «         Zd„ ZdS )ÚTestFuzzz	.testcasec                 ó:  — |                       |¦  «        }g d¢}	 t          |d         ¦  «        t          |¦  «        z  }n# t          $ r Y d S w xY w|dd…         |dd …         }}	 t	          |dd …         ||         ¬¦  «        }n# t
          $ r Y d S t          $ r Y d S w xY wt          |                     d¦  «        ¦  «         	 |j         	                    | 
                    dd¦  «        ¦  «         n# t          $ r Y d S w xY w|                     ¦   «          d S )	N)zlxml-xmlÚhtml5libúhtml.parserÚlxmlr   é   é
   )ÚfeaturesTzutf-8Úreplace)Ú_TestFuzz__markupÚintÚlenÚ
ValueErrorr   r   ÚlistÚfind_allÚcssÚselectÚdecoder   Úprettify)ÚselfÚfilenameÚdataÚparsersÚidxÚcss_selectorÚsoups          úR/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/bs4/tests/test_fuzz.pyÚfuzz_test_with_csszTestFuzz.fuzz_test_with_css)   sW  € Ø}Š}˜XÑ&Ô&ˆØAÐAÐAˆð	Ýd˜1”g‘,”,¥ W¡¤Ñ-ˆCˆCøÝð 	ð 	ð 	ØˆFˆFð	øøøð " ! B $œZ¨¨b¨c¨c¬dˆð	Ý   a b b¤°G¸C´LÐAÑAÔAˆDˆDøÝ#ð 	ð 	ð 	ØˆFˆFÝð 	ð 	ð 	ØˆFˆFð	øøøõ 	ˆT]Š]˜4Ñ Ô Ñ!Ô!Ð!ð	ØŒHOŠO˜L×/Ò/°¸ÑCÔCÑDÔDÐDÐDøÝ"ð 	ð 	ð 	ØˆFˆFð	øøøàŠ‰Œˆˆˆs;   ›%A Á
AÁAÁ'B Â
B!Â	B!Â B!Ã.C6 Ã6
DÄDr   z:clusterfuzz-testcase-minimized-bs4_fuzzer-5703933063462912z.crash-ffbdfa8a2b26f13537b68d3794b0478a4090ee4ac                 ó´   — |                       |¦  «        }t          j        t          ¦  «        5  t	          |d¦  «         d d d ¦  «         d S # 1 swxY w Y   d S ©Nr   )r   ÚpytestÚraisesr   r   ©r   r   Úmarkups      r#   Útest_rejected_markupzTestFuzz.test_rejected_markupD   sš   € ð —’˜xÑ(Ô(ˆÝŒ]Õ/Ñ0Ô0ð 	1ð 	1Ý˜& -Ñ0Ô0Ð0ð	1ð 	1ð 	1ñ 	1ô 	1ð 	1ð 	1ð 	1ð 	1ð 	1ð 	1ð 	1øøøð 	1ð 	1ð 	1ð 	1ð 	1ð 	1s   ¯AÁ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                 ót   — |                       |¦  «        }t          |d¦  «                             ¦   «          d S r&   )r   r   Úencoder)   s      r#   Ú'test_deeply_nested_document_without_cssz0TestFuzz.test_deeply_nested_document_without_cssV   s7   € ð —’˜xÑ(Ô(ˆÝf˜mÑ,Ô,×3Ò3Ñ5Ô5Ð5Ð5Ð5ó    )z:clusterfuzz-testcase-minimized-bs4_fuzzer-5000587759190016z:clusterfuzz-testcase-minimized-bs4_fuzzer-5375146639360000z:clusterfuzz-testcase-minimized-bs4_fuzzer-5492400320282624c                 ó0   — |                       |¦  «         d S ©N©r$   ©r   r   s     r#   Útest_deeply_nested_documentz$TestFuzz.test_deeply_nested_documenti   s   € ð ×Ò˜xÑ(Ô(Ð(Ð(Ð(r/   z:clusterfuzz-testcase-minimized-bs4_fuzzer-4670634698080256z:clusterfuzz-testcase-minimized-bs4_fuzzer-5270998950477824c                 ó0   — |                       |¦  «         d S r1   r2   r3   s     r#   Útest_soupsieve_errorszTestFuzz.test_soupsieve_errorss   s   € ð 	×Ò Ñ)Ô)Ð)Ð)Ð)r/   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                 óŽ   — |                       |¦  «        }t          t          |d¦  «                             ¦   «         ¦  «         d S )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Ô8Ñ9Ô9Ð9Ð9Ð9r/   z:clusterfuzz-testcase-minimized-bs4_fuzzer-6306874195312640c                 ó0   — |                       |¦  «         d S r1   r2   r3   s     r#   Útest_html5lib_parse_errorsz#TestFuzz.test_html5lib_parse_errors¡   s   € ð 	×Ò Ñ)Ô)Ð)Ð)Ð)r/   c                 ó$  — |                      | j        ¦  «        s
|| j        z  }t          j                             t
          ¦  «        d         }t          j                             |d|¦  «        }t          |d¦  «                             ¦   «         S )Nr   ÚfuzzÚrb)	ÚendswithÚTESTCASE_SUFFIXÚosÚpathÚsplitÚ__file__ÚjoinÚopenÚread)r   r   Úthis_dirrB   s       r#   Ú__markupzTestFuzz.__markup«   ss   € Ø× Ò  Ô!5Ñ6Ô6ð 	-Ø˜Ô,Ñ,ˆHÝ”7—=’=¥Ñ*Ô*¨1Ô-ˆÝŒw|Š|˜H f¨hÑ7Ô7ˆÝD˜$ÑÔ×$Ò$Ñ&Ô&Ð&r/   N)Ú__name__Ú
__module__Ú__qualname__r@   r$   r'   ÚmarkÚparametrizer+   r.   r4   r6   Úskipr9   r;   r   © r/   r#   r	   r	      sô  € € € € € ð
 "€Oðð ð ð6 „[×ÒØØHØ<ð
ñô ð1ð 1ñô ð1ð „[×ÒØð 
ð 
ð 
ñô ð6ð 6ñô ð6ð „[×ÒØð 
ð 
ð 
ñô ð)ð )ñô ð)ð „[×ÒØØHØHð
ñô ð*ð *ñô ð*ð „[×ÒÐ9ÐÑ:Ô:Ø„[×ÒØð 
ð 
ð 
ñô ð*:ð :ñ+ô ñ ;Ô:ð,:ð „[×ÒÐ9ÐÑ:Ô:Ø„[×ÒØàHð
ñô ð*ð *ñô ñ ;Ô:ð*ð'ð 'ð 'ð 'ð 'r/   r	   )Ú__doc__rA   r'   Úbs4r   r   Úsoupsieve.utilr   r   r   Úfully_fuzzableÚImportErrorrM   ÚskipifÚobjectr	   rP   r/   r#   ú<module>rX      s  ðð	ð 	ð 
€	€	€	Ø €€€ðð ð ð ð ð ð ð ðØ2Ð2Ð2Ð2Ð2Ð2Ø€K€K€KØ€O€O€OØ€N€NøØð ð ð Ø€N€N€Nðøøøð „×Ò˜Ð&Ð/`ÐÑaÔaðU'ð U'ð U'ð U'ð U'ˆvñ U'ô U'ñ bÔaðU'ð U'ð U's   ”% ¥/®/