File: //opt/alt/python312/lib64/python3.12/test/__pycache__/test_sax.cpython-312.opt-2.pyc
�
~h�e� � �� � d dl mZmZmZmZmZ d dlZd dlmZ e� d dl m
Z
mZmZm
Z
mZmZ d dlmZ d dlmZmZmZ d dlmZmZmZ d d lmZmZ d dlZd dlZd dl Z d dl!Z!d d
l"m#Z# d dl$Z%d dl&m'Z' d dl&m(Z( d d
l)m*Z*m+Z+ e(dd�� Z, e(dd�� Z- e,j] d� e-j] d� dZ0ejb jd s+ e'jf j] e!jh � � ejn e0d� Z8dZ9 G d� dejt � Z;d@d�Z<dAd�Z=dAd�Z> G d� dejt � Z? G d� d ejt � Z@ G d!� d"ejt � ZA G d#� d$ejt � ZB G d%� d&� ZC G d'� d(eCejt � ZD G d)� d*eCejt � ZE G d+� d,eE� ZF G d-� d.eCejt � ZG G d/� d0eCejt � ZHd1ZI G d2� d3ejt � ZJ eKe-d4� 5 ZLeLj� � ZNddd� G d5� d6e;� ZO G d7� d8ejt � ZP G d9� d:e;� ZQ G d;� d<ejt � ZR G d=� d>ejt � ZSeTd?k( r ej� � yy# e$ r ej d� �w xY w# e/$ r ej d� �w xY w# e5e6f$ r dZ0Y ���w xY w# 1 sw Y ��xY w)B� )�make_parser�ContentHandler�SAXException�SAXReaderNotAvailable�SAXParseExceptionN)�mockzno XML parsers available)�XMLGenerator�escape�unescape� quoteattr�
XMLFilterBase�prepare_input_source)�
create_parser)�feature_namespaces�feature_external_ges�LexicalHandler)�InputSource�AttributesImpl�AttributesNSImpl)�BytesIO�StringIO)�URLError)� os_helper)�findfile)�FakePath�TESTFNztest.xml�xmltestdata)�subdirztest.xml.out�utf-8z!filename is not encodable to utf8TFz$Requires non-ascii filenames supportz%http://www.python.org/xml-ns/saxtest/c � � e Zd Zd� Zd� Zd� Zy)�XmlTestBasec �� � | j t |j d� | j t |j d� | j t |j d� | j t |j
d� | j t |j d� | j |j � d� | j |j � g � | j |j � g � | j t |� d� | j d|� | j t |j � � g � | j |j d� d � | j |j dd� d� | j t |j! � � g � | j t |j# � � g � y )N�attrr �attrs� )�assertRaises�KeyError�getValue�getValueByQName�getNameByQName�getQNameByName�__getitem__�assertEqual� getLength�getNames� getQNames�len�assertNotIn�list�keys�get�items�values��selfr$ s �4/opt/alt/python312/lib64/python3.12/test/test_sax.py�verify_empty_attrszXmlTestBase.verify_empty_attrs6 sf � ����(�E�N�N�F�;����(�E�$9�$9�6�B����(�E�$8�$8�&�A����(�E�$8�$8�&�A����(�E�$5�$5�v�>�������*�A�.�������)�2�.�������*�B�/�����U��Q�'������'�����e�j�j�l�+�R�0�������7�+�T�2�������7�B�/��4�����e�k�k�m�,�b�1�����e�l�l�n�-�r�2� c �, � | j t |j t df� | j t |j d� | j t |j
d� | j t |j t df� | j t |j t df� | j |j � d� | j |j � g � | j |j � g � | j t |� d� | j t df|� | j t |j � � g � | j |j! t df� d � | j |j! t dfd� d� | j t |j# � � g � | j t |j% � � g � y )Nr# �ns:attrr r% )r&