| Server IP : 35.80.110.71 / Your IP : 216.73.216.221 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/bs4/tests/__pycache__/ |
Upload File : |
�
��e< � � � d Z ddlZddlZddlmZmZ ddlmZ ddlZddl Z dZ
ej j e
d�� G d � d
e� � Zy# e$ r dZ
Y �6w xY 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)�SelectorSyntaxErrorTFz/Prerequisites for fuzz tests are not installed.��reasonc �F � e Zd ZdZd� Zej j dddg� d� � Zej j dg d�� d� � Z ej j dg d �� d
� � Z
ej j dddg� d
� � Zej j d�� ej j dg d�� d� � � Z
ej j d�� ej j ddg� d� � � Zd� Zy)�TestFuzzz .testcasec � � | j |� }g d�} t |d � t |� z }|dd |dd }} t |dd || �� }t
|j d� � |j j |j dd� � |j � y # t $ r Y y w xY w# t
$ r Y y t $ r Y y w xY w# t $ r Y y w xY w) N)zlxml-xml�html5lib�html.parser�lxmlr � �
)�featuresTzutf-8�replace)
�_TestFuzz__markup�int�len�
ValueErrorr r �list�find_all�css�select�decoder �prettify)�self�filename�data�parsers�idx�css_selector�soups �5/usr/lib/python3/dist-packages/bs4/tests/test_fuzz.py�fuzz_test_with_csszTestFuzz.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&