403Webshell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/bs4/tests/__pycache__/test_builder_registry.cpython-38.pyc
U

c�T��@s�dZddlZddlZddlmZddlmZmZm	Z	zddlm
Z
dZWnek
r`dZYnXzddlm
Z
mZdZWnek
r�dZYnXGd	d
�d
ej�ZGdd�dej�ZdS)
zTests of the builder registry.�N)�
BeautifulSoup)�builder_registry�HTMLParserTreeBuilder�TreeBuilderRegistry)�HTML5TreeBuilderTF)�LXMLTreeBuilderForXML�LXMLTreeBuilderc@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�BuiltInRegistryTestz@Test the built-in registry with the default builders registered.cCs`tr|�t�dd�t�tr0|�t�dd�t�|�t�dd�t�tr\|�t�dd�t�dS)N�fast�htmlZ
permissive�xml�strict�html5lib)	�LXML_PRESENT�assertEqual�registry�lookuprrr�HTML5LIB_PRESENTr��self�r�A/usr/lib/python3/dist-packages/bs4/tests/test_builder_registry.py�test_combination s����z$BuiltInRegistryTest.test_combinationcCsjtr*|�t�d�t�|�t�d�t�n<|�t�d�d�trT|�t�d�t�n|�t�d�t�dS)Nrr)	rrrrrrrrrrrrr�test_lookup_by_markup_type.sz.BuiltInRegistryTest.test_lookup_by_markup_typecCsXtr,|�t�dd�t�|�t�dd�t�trB|�t�d�t�|�t�d�t�dS)NZlxmlrrrzhtml.parser)	rrrrrrrrrrrrr�test_named_library9s����z&BuiltInRegistryTest.test_named_libraryc	CsJtjdd��"}tddd�tdddgd�W5QRX|jttddd�dS)NT)�record�r)�featuresr
zno-such-feature)�warnings�catch_warningsrZassertRaises�
ValueError)r�wrrr�*test_beautifulsoup_constructor_does_lookupFs�z>BuiltInRegistryTest.test_beautifulsoup_constructor_does_lookupN)�__name__�
__module__�__qualname__�__doc__rrrr"rrrrr	s

r	c@sXeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�ZdS)�RegistryTestz.Test the TreeBuilderRegistry class in general.cCst�|_dS�N)rrrrrr�setUpYszRegistryTest.setUpcGs,tdd�|�tfd|i�}|j�|�|S)NZBuilder_�_r)�type�join�objectr�register)rZfeature_list�clsrrr�builder_for_features\s�z!RegistryTest.builder_for_featurescCs2|��}|�|j�d�d�|�|j��|�dS)N�foo�r0rrr�rZbuilderrrr�test_register_with_no_featurescsz+RegistryTest.test_register_with_no_featurescCs8|�dd�}|�|j�d�|�|�|j�d�|�dS�Nr1�barr2r3rrr�0test_register_with_features_makes_lookup_succeednsz=RegistryTest.test_register_with_features_makes_lookup_succeedcCs$|�dd�}|�|j�d�d�dS�Nr1r6�bazr2r3rrr�4test_lookup_fails_when_no_builder_implements_featuresszARegistryTest.test_lookup_fails_when_no_builder_implements_featurecCs*|�d�}|�d�}|�|j��|�dSr5r2�rZbuilder1Zbuilder2rrr�Ctest_lookup_gets_most_recent_registration_when_no_feature_specifiedws

zPRegistryTest.test_lookup_gets_most_recent_registration_when_no_feature_specifiedcCs|�|j��d�dSr()rrrrrrr�2test_lookup_fails_when_no_tree_builders_registered|sz?RegistryTest.test_lookup_fails_when_no_tree_builders_registeredcCsv|�d�}|�d�}|�ddd�}|�ddd�}|�d�}|�d�}|�|j�dd�|�|�|j�ddd�|�dS)Nr1r6r9Zquuxr2)rZhas_oneZ
has_the_otherZhas_both_earlyZ
has_both_lateZ	lacks_onerrr�<test_lookup_gets_most_recent_builder_supporting_all_featuress



��zIRegistryTest.test_lookup_gets_most_recent_builder_supporting_all_featurescCs2|�dd�}|�dd�}|�|j�dd�d�dSr8r2r;rrr�:test_lookup_fails_when_cannot_reconcile_requested_features�szGRegistryTest.test_lookup_fails_when_cannot_reconcile_requested_featuresN)
r#r$r%r&r)r0r4r7r:r<r=r>r?rrrrr'Vsr')r&ZunittestrZbs4rZbs4.builderrrrrrr�ImportErrorrrrZTestCaser	r'rrrr�<module>s 

9

Youez - 2016 - github.com/yon3zu
LinuXploit