1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
U
¡ý°d5ã@s8dZddlZddlZddlmZmZGdd„deƒZdS)aThis 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
@s|eZdZdZej ddg¡dd„ƒZej ddddd    g¡d
d „ƒZej     d ¡ej dd dddddg¡dd„ƒƒZ
dd„Z dS)ÚTestFuzzz    .testcaseÚfilenamez:clusterfuzz-testcase-minimized-bs4_fuzzer-5703933063462912c    Cs.| |¡}t t¡t|dƒW5QRXdS©Nz html.parser)Ú_TestFuzz__markupÚpytestZraisesrr©ÚselfrZmarkup©r úJd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\bs4/tests/test_fuzz.pyÚtest_rejected_markups
 zTestFuzz.test_rejected_markupz:clusterfuzz-testcase-minimized-bs4_fuzzer-5984173902397440z:clusterfuzz-testcase-minimized-bs4_fuzzer-5167584867909632z:clusterfuzz-testcase-minimized-bs4_fuzzer-6124268085182464z:clusterfuzz-testcase-minimized-bs4_fuzzer-6450958476902400cCs| |¡}t|dƒ ¡dSr)rrÚencoder    r r r Útest_deeply_nested_document)s
z$TestFuzz.test_deeply_nested_documentzhtml5lib problemsz: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-0d306a50c8ed8bcd0785b67000fcd5dea1d33f08cCs | |¡}tt|dƒ ¡ƒdS)NÚhtml5lib)rÚprintrrr    r r r Útest_html5lib_parse_errors<s
z#TestFuzz.test_html5lib_parse_errorscCsD| |j¡s||j7}tj t¡d}tj |d|¡}t|dƒ ¡S)NrZfuzzÚrb)    ÚendswithÚTESTCASE_SUFFIXÚosÚpathÚsplitÚ__file__ÚjoinÚopenÚread)r
rZthis_dirrr r r Z__markupVs
 
zTestFuzz.__markupN) Ú__name__Ú
__module__Ú __qualname__rrÚmarkZ parametrizer rÚskiprrr r r r rs:ÿÿ
    üÿ
 
ïÿ r)Ú__doc__rrZbs4rrÚobjectrr r r r Ú<module>s