| Server IP : 217.160.0.135 / Your IP : 216.73.216.91 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/bs4/tests/__pycache__/ |
Upload File : |
�
oD�c� � �J � d Z ddlmZ ddlZddlZddlZddlmZ ddlm Z m
Z
ddlmZm
Z
mZmZmZmZmZmZmZmZmZ ddlmZ G d � d
e� � Z G d� de� � Z G d
� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z! G d� de!� � Z" G d� de!� � Z# G d� d e� � Z$ G d!� d"e$� � Z% G d#� d$e$� � Z& G d%� d&e� � Z' G d'� d(e� � Z(dS ))a8 Tests for Beautiful Soup's tree traversal methods.
The tree traversal methods are the main advantage of using Beautiful
Soup over just using a parser.
Different parsers will build different Beautiful Soup trees given the
same markup, but all Beautiful Soup trees can be traversed with the
methods tested here.
� )� set_traceN)�
BeautifulSoup)�builder_registry�HTMLParserTreeBuilder)�CData�Comment�Declaration�Doctype� Formatter�NavigableString�Script�SoupStrainer�
Stylesheet�Tag�TemplateString� )�SoupTestc �0 � e Zd ZdZd� Zd� Zd� Zd� Zd� ZdS )�TestFindz�Basic tests of the find() method.
find() just calls find_all() with limit=1, so it's not tested all
that thouroughly here.
c �p � | � d� � }|� d� � j dk sJ �d S )Nz <a>1</a><b>2</b><a>3</a><b>4</b>�b�2)�soup�find�string��selfr s �5/usr/lib/python3/dist-packages/bs4/tests/test_tree.py�
test_find_tagzTestFind.test_find_tag- s8 � ��y�y�;�<�<���y�y��~�~�$��+�+�+�+�+�+� c �h � | � d� � }|� d�� � dk sJ �d S )Nu <h1>Räksmörgås</h1>�
Räksmörgås�r )r r r s r �test_unicode_text_findzTestFind.test_unicode_text_find1 s9 � ��y�y�1�2�2���y�y��y�0�0�O�C�C�C�C�C�Cr c � � | � d� � }t |� � d|� d�� � j k sJ �d S )Nu&