zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
U
¡ý°dI    ã@sHdZddlmZmZmZddlmZGdd„deƒZGdd„deƒ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,eZdZdd„Zdd„Zdd„Zdd„Zd    S)
ÚTestNamedspacedAttributecCsDtddƒ}|dkst‚tddƒ}|dks,t‚tdƒ}|dks@t‚dS)NÚxmlnsÚ©rÚAssertionError©ÚselfÚa©rúMd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\bs4/tests/test_element.pyÚ test_name_may_be_none_or_missings 
 
 z9TestNamedspacedAttribute.test_name_may_be_none_or_missingcCs0tddƒ}|dkst‚tddƒ}|dks,t‚dS)NÚtagr    r
r rrrÚ%test_namespace_may_be_none_or_missings
 
z>TestNamedspacedAttribute.test_namespace_may_be_none_or_missingcCstddƒ}d|kst‚dS)NrÚbza:br
r rrrÚ6test_attribute_is_equivalent_to_colon_separated_string"s
zOTestNamedspacedAttribute.test_attribute_is_equivalent_to_colon_separated_stringcCsptdddƒ}tdddƒ}||ks$t‚tdddƒ}||ks<t‚tdddƒ}||ksTt‚tdddƒ}||kslt‚dS)NrrÚcÚzr
)r rrrÚdÚerrrÚ;test_attributes_are_equivalent_if_prefix_and_name_identical&s        zTTestNamedspacedAttribute.test_attributes_are_equivalent_if_prefix_and_name_identicalN)Ú__name__Ú
__module__Ú __qualname__rrrrrrrrrs
rc@s eZdZdZdd„Zdd„ZdS)Ú)TestAttributeValueWithCharsetSubstitutionzpCertain attributes are designed to have the charset of the
    final document substituted into their value.
    cCsJtdƒ}d|kst‚d|jks"t‚d| d¡ks4t‚d| d¡ksFt‚dS)Nzeuc-jpÚutf8Úascii)rr Úoriginal_valueÚencode©r ÚvaluerrrÚ!test_content_meta_attribute_value<s
 zKTestAttributeValueWithCharsetSubstitution.test_content_meta_attribute_valuecCsJtdƒ}d|kst‚d|jks"t‚d| d¡ks4t‚d| d¡ksFt‚dS)Nztext/html; charset=euc-jpztext/html; charset=utf8rztext/html; charset=asciir )rr r!r"r#rrrr%Es
 N)rrrÚ__doc__r%rrrrr7s    rN)
r&Z bs4.elementrrrr    rÚobjectrrrrrrÚ<module>s (