
    n9d5                     F    d Z ddlZddlZddlmZmZ  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ParserRejectedMarkupc                   :   e Zd ZdZej                            ddg          d             Zej                            dg d          d             Zej        	                    d          ej                            dg d          d	                         Z
d
 ZdS )TestFuzzz	.testcasefilenamez:clusterfuzz-testcase-minimized-bs4_fuzzer-5703933063462912c                     |                      |          }t          j        t                    5  t	          |d           d d d            d S # 1 swxY w Y   d S Nzhtml.parser)_TestFuzz__markuppytestraisesr   r   selfr   markups      3lib/python3.11/site-packages/bs4/tests/test_fuzz.pytest_rejected_markupzTestFuzz.test_rejected_markup   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_documentz$TestFuzz.test_deeply_nested_document)   s7     x((fm,,3355555    zhtml5lib problems)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 )Nhtml5lib)r
   printr   r   r   s      r   test_html5lib_parse_errorsz#TestFuzz.test_html5lib_parse_errors<   s?    . x((mFJ//668899999r   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_dirr    s       r   __markupzTestFuzz.__markupV   ss      !566 	-,,H7==**1-w||Hfh77D$$$&&&r   N)__name__
__module____qualname__r   r   markparametrizer   r   skipr   r
    r   r   r   r      s        "O
 [H
 
1 1 
1 [ 
 
 
 6 6 6 [)**[ 
 
 
 *: :+  +*,:' ' ' ' 'r   r   )__doc__r   r   bs4r   r   objectr   r.   r   r   <module>r2      s   	 	 
			        
I' I' I' I' I'v I' I' I' I' I'r   