o
    ƒªRhI	  ã                   @   sH   d Z ddlmZmZmZ ddlmZ G dd„ deƒZG dd„ deƒZ	d	S )
z‚Tests of classes in element.py.

The really big classes -- Tag, PageElement, and NavigableString --
are tested in separate files.
é    )ÚCharsetMetaAttributeValueÚContentMetaAttributeValueÚNamespacedAttributeé   )ÚSoupTestc                   @   s,   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	S )
ÚTestNamedspacedAttributec                 C   sD   t dd ƒ}|dksJ ‚t ddƒ}|dksJ ‚t dƒ}|dks J ‚d S )NÚxmlnsÚ ©r   ©ÚselfÚa© r   úX/home/air/sanwanet/backup_V2/venv/lib/python3.10/site-packages/bs4/tests/test_element.pyÚ test_name_may_be_none_or_missing   s   

z9TestNamedspacedAttribute.test_name_may_be_none_or_missingc                 C   s0   t d dƒ}|dksJ ‚t ddƒ}|dksJ ‚d S )NÚtagr	   r
   r   r   r   r   Ú%test_namespace_may_be_none_or_missing   s   

z>TestNamedspacedAttribute.test_namespace_may_be_none_or_missingc                 C   s   t ddƒ}d|ksJ ‚d S )Nr   Úbza:br
   r   r   r   r   Ú6test_attribute_is_equivalent_to_colon_separated_string"   s   
zOTestNamedspacedAttribute.test_attribute_is_equivalent_to_colon_separated_stringc                 C   sp   t dddƒ}t dddƒ}||ksJ ‚t ddd ƒ}||ksJ ‚t dddƒ}||ks*J ‚t dddƒ}||ks6J ‚d S )Nr   r   ÚcÚzr
   )r   r   r   r   ÚdÚer   r   r   Ú;test_attributes_are_equivalent_if_prefix_and_name_identical&   s   zTTestNamedspacedAttribute.test_attributes_are_equivalent_if_prefix_and_name_identicalN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r   r   r      s
    
r   c                   @   s    e Zd ZdZdd„ Zdd„ ZdS )Ú)TestAttributeValueWithCharsetSubstitutionzpCertain attributes are designed to have the charset of the
    final document substituted into their value.
    c                 C   sJ   t dƒ}d|ks
J ‚d|jksJ ‚d| d¡ksJ ‚d| d¡ks#J ‚d S )Nzeuc-jpÚutf8Úascii)r   Úoriginal_valueÚencode©r   Úvaluer   r   r   Ú!test_content_meta_attribute_value<   s
   zKTestAttributeValueWithCharsetSubstitution.test_content_meta_attribute_valuec                 C   sJ   t dƒ}d|ks
J ‚d|jksJ ‚d| d¡ksJ ‚d| d¡ks#J ‚d S )Nztext/html; charset=euc-jpztext/html; charset=utf8r   ztext/html; charset=asciir   )r   r    r!   r"   r   r   r   r$   E   s
   N)r   r   r   Ú__doc__r$   r   r   r   r   r   7   s    	r   N)
r%   Úbs4.elementr   r   r   r	   r   Úobjectr   r   r   r   r   r   Ú<module>   s
    (