| Server IP : 104.21.4.30 / Your IP : 104.23.197.57 Web Server : Apache System : Linux keen-cori.18-142-40-148.plesk.page 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 06:59:36 UTC 2025 x86_64 User : simottodesign.com_2tntp341vs7 ( 10011) PHP Version : 8.3.31 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/bs4/tests/__pycache__/ |
Upload File : |
U
c�T� � @ s� d Z ddlZddlZddlmZ ddlmZmZm Z zddlm
Z
dZW n ek
r` dZY nX zddlm
Z
mZ dZW n ek
r� dZY nX G d d
� d
ej�ZG dd� dej�ZdS )
zTests of the builder registry.� N)�
BeautifulSoup)�builder_registry�HTMLParserTreeBuilder�TreeBuilderRegistry)�HTML5TreeBuilderTF)�LXMLTreeBuilderForXML�LXMLTreeBuilderc @ s0 e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
S )�BuiltInRegistryTestz@Test the built-in registry with the default builders registered.c C s` t r| �t�dd�t� t r0| �t�dd�t� | �t�dd�t� tr\| �t�dd�t� d S )N�fast�htmlZ
permissive�xml�strict�html5lib) �LXML_PRESENT�assertEqual�registry�lookupr r r �HTML5LIB_PRESENTr ��self� r �A/usr/lib/python3/dist-packages/bs4/tests/test_builder_registry.py�test_combination s ����z$BuiltInRegistryTest.test_combinationc C sj t r*| �t�d�t� | �t�d�t� n<| �t�d�d � trT| �t�d�t� n| �t�d�t� d S )Nr r ) r r r r r r r r r r r r r �test_lookup_by_markup_type. s z.BuiltInRegistryTest.test_lookup_by_markup_typec C sX t r,| �t�dd�t� | �t�dd�t� trB| �t�d�t� | �t�d�t� d S )NZlxmlr r r zhtml.parser) r r r r r r r r r r r r r �test_named_library9 s ����z&BuiltInRegistryTest.test_named_libraryc C sJ t jdd��"}tddd� tdddgd� W 5 Q R X | jttddd� d S )NT)�record� r )�featuresr
zno-such-feature)�warnings�catch_warningsr ZassertRaises�
ValueError)r �wr r r �*test_beautifulsoup_constructor_does_lookupF s �z>BuiltInRegistryTest.test_beautifulsoup_constructor_does_lookupN)�__name__�
__module__�__qualname__�__doc__r r r r"