D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
local
/
lib64
/
python3.9
/
site-packages
/
lxml
/
__pycache__
/
Filename :
doctestcompare.cpython-39.pyc
back
Copy
a ��JhCE � @ s. d Z ddlmZ ddlZddlZddlZzddlmZ W n e yV ddl mZ Y n0 g d�Ze�d�Z e�d�Ze�d�ZejZd d � Zdd� Zejd dd�Zdd� Ze�d�Ze�d�ZG dd� de�ZG dd� de�Zd#dd�Zd$dd�ZG dd� d�Zdd� Zd d!iZe d"k�r*ddlZe�!� 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 ``<html``). You can also use the ``PARSE_HTML`` and ``PARSE_XML`` flags to force parsing. Some rough wildcard-like things are allowed. Whitespace is generally ignored (except in attributes). In text (attributes and text in the body) you can use ``...`` as a wildcard. In an example it also matches any trailing tags in the element, though it does not match leading tags. You may create a tag ``<any>`` 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_installr r r c C s | d u rd S | � � S d S �N)�strip��v� r �?/usr/local/lib64/python3.9/site-packages/lxml/doctestcompare.pyr 8 s r c C s t �d| �S )N� )�_norm_whitespace_re�subr r r r �norm_whitespace>