📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-22 01:35:15
📂
/ (Root)
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
bs4
/
tests
/
__pycache__
📍 /opt/alt/python37/lib/python3.7/site-packages/bs4/tests/__pycache__
🔄 Refresh
✏️
Editing: test_builder_registry.cpython-37.pyc
Read Only
B c�T� � @ s� d Z ddlZddlZddlmZ ddlmZmZm Z yddlm Z dZW n ek r` dZY nX yddlm 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 �P/opt/alt/python37/lib/python3.7/site-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 )N�lxmlr 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 d 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"