File: D:/Python311/Lib/site-packages/bs4/tests/__pycache__/test_dammit.cpython-311.pyc
�
��nc@= � � � d dl Z d dlZd dlZd dlmZ d dlmZmZmZ G d� de� � Z G d� de� � Z
G d� d e� � ZdS )
� N)�
BeautifulSoup)�EntitySubstitution�EncodingDetector�
UnicodeDammitc �T � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
� Zd� Z
d� Zd
S )�TestUnicodeDammitz"Standalone tests of UnicodeDammit.c �B � d}t |� � }|j |k sJ �d S )Nu I'm already Unicode! ☃�r �unicode_markup��self�markup�dammits �7D:\Python311\Lib\site-packages\bs4/tests/test_dammit.py�test_unicode_inputz$TestUnicodeDammit.test_unicode_input s. � �3���v�&�&���$��.�.�.�.�.�.� c �B � d}t |� � }|j dk sJ �d S )N� <foo>����</foo>u <foo>‘’“”</foo>r
r s r �test_smart_quotes_to_unicodez.TestUnicodeDammit.test_smart_quotes_to_unicode s/ � �/���v�&�&���$�(M�M�M�M�M�M�Mr c �F � d}t |d�� � }|j dk sJ �d S )Nr �xml��smart_quotes_toz+<foo>‘’“”</foo>r
r s r �!test_smart_quotes_to_xml_entitiesz3TestUnicodeDammit.test_smart_quotes_to_xml_entities s4 � �/���v�u�=�=�=���$�(U�U�U�U�U�U�Ur c �F � d}t |d�� � }|j dk sJ �d S )Nr �htmlr z'<foo>‘’“”</foo>r
r s r �"test_smart_quotes_to_html_entitiesz4TestUnicodeDammit.test_smart_quotes_to_html_entities s4 � �/���v�v�>�>�>���$�(Q�Q�Q�Q�Q�Q�Qr c �F � d}t |d�� � }|j dk sJ �d S )Nr �asciir z<foo>''""</foo>r
r s r �test_smart_quotes_to_asciiz,TestUnicodeDammit.test_smart_quotes_to_ascii# s4 � �/���v�w�?�?�?���$�(=�=�=�=�=�=�=r c � � d}t |� � }|j � � � dk sJ �|j dk sJ �d S )Ns Sacré bleu! ☃�utf-8u Sacré bleu! ☃�r �original_encoding�lowerr )r
�utf8r s r �test_detect_utf8z"TestUnicodeDammit.test_detect_utf8( sO � �1���t�$�$���'�-�-�/�/�7�:�:�:�:��$�(D�D�D�D�D�D�Dr c � � d}t |dg� � }|j � � � dk sJ �|j dk sJ �d S )N� ���
iso-8859-8u םולשr# �r
�hebrewr s r �test_convert_hebrewz%TestUnicodeDammit.test_convert_hebrew. sS � �$���v��~�6�6���'�-�-�/�/�<�?�?�?�?��$�(B�B�B�B�B�B�Br c � � d}t |� � }|j � � � dk sJ �|j � d� � |k sJ �d S )Ns ケータイ Watchr"