/opt/alt/python37/lib64/python3.7/site-packages/lxml/__pycache__
Edit: /opt/alt/python37/lib64/python3.7/site-packages/lxml/__pycache__/doctestcompare.cpython-37.pyc (13776B)
B
þ|/\£G ã @ sp d Z ddlmZ ddlZddlZddlZyddlmZ W n e k
rX ddl
mZ Y nX ddddd d
dgZyeZ
W n ek
r eefZ
Y nX ejd dkZe d¡Ze d¡Ze d¡ZejZd
d„ Zdd„ ZejdddZdd„ Ze d¡Ze d¡ZG dd„ deƒZ G dd „ d e ƒZ!d#dd
„Z"d$dd„Z#G dd„ de$ƒZ%dd„ Z&d d!iZ'e(d"krlddlZe )¡ dS )%aÑ
lxml-based doctest output comparison.
Note: normally, you should just import the `lxml.usedoctest` and
`lxml.html.usedoctest` modules from within a doctest, instead of this
one::
>>> import lxml.usedoctest # for XML output
>>> import lxml.html.usedoctest # for HTML output
To use this module directly, you must call ``lxmldoctest.install()``,
which will cause doctest to use this in all subsequent calls.
This changes the way output is checked and comparisons are made for
XML or HTML-like content.
XML or HTML content is noticed because the example starts with ``<``
(it's HTML if it starts with ```` or include an ``any``
attribute in the tag. An ``any`` tag matches any tag, while the
attribute matches any and all attributes.
When a match fails, the reformatted example and gotten text is
displayed (indented), and a rough diff-like output is given. Anything
marked with ``+`` is in the output but wasn't supposed to be, and
similarly ``-`` means its in the example but wasn't in the output.
You can disable parsing on one line with ``# doctest:+NOPARSE_MARKUP``
é )ÚetreeN)ÚescapeÚ
PARSE_HTMLÚ PARSE_XMLÚNOPARSE_MARKUPÚLXMLOutputCheckerÚLHTMLOutputCheckerÚinstallÚtemp_installé c C s | d krd S | ¡ S d S )N)Ústrip)Úv© r úF/opt/alt/python37/lib64/python3.7/site-packages/lxml/doctestcompare.pyr ? s r c C s t d| ¡S )Nú )Ú_norm_whitespace_reÚsub)r
r r r Únorm_whitespaceE s r FT)ZrecoverZremove_blank_textc C s t | t¡S )N)r Z
fromstringÚ_html_parser)Úhtmlr r r Úhtml_fromstringJ s r z^<[^>]+ (at|object) z[ \t\n][ \t\n]+c @ s e Zd ZdZdd„ Zdd„ Zdd„ Zdd „ Zd
d„ Zdd
„ Z dd„ Z
dd„ Zd'dd„Zd(dd„Z
d)dd„Zdd„ Zdd„ Zdd„ Zd d!„ Zd"d#„ Zd*d$d%„Zd&S