관리-도구
편집 파일: tests.cpython-311.pyc
� �Re� � �x � d Z ddlmZ ddlmZmZmZmZmZm Z m Z mZmZ d� Z d� Zd� Zd� Zd � Zd � Zd� Zd� Zd � ZdS )z� webencodings.tests ~~~~~~~~~~~~~~~~~~ A basic test suite for Encoding. :copyright: Copyright 2012 by Simon Sapin :license: BSD, see LICENSE for details. � )�unicode_literals� ) �lookup�LABELS�decode�encode�iter_decode�iter_encode�IncrementalDecoder�IncrementalEncoder�UTF8c �P � ||i |�� t d| z � � �# | $ r Y d S w xY w)NzDid not raise %s.)�AssertionError)� exception�function�args�kwargss ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/webencodings/tests.py� assert_raisesr sV � �>���$�!�&�!�!�!� �0�9�<�=�=�=�� � � � �������s � �%�%c �� � t d� � j dk sJ �t d� � j dk sJ �t d� � j dk sJ �t d� � j dk sJ �t d� � j dk sJ �t d� � j dk sJ �t d� � j dk sJ �t d� � �J �t d� � �J �t d � � j d k sJ �t d� � j d k sJ �t d� � j d k sJ �t d � � j d k sJ �t d� � �J �t d� � �J �d S )Nzutf-8zUtf-8zUTF-8�utf8zutf8 z utf8 �u8u utf-8 zUS-ASCIIzwindows-1252z iso-8859-1�latin1�LATIN1zlatin-1u LATİN1)r �name� � r �test_labelsr s~ � ��'�?�?��7�*�*�*�*��'�?�?��7�*�*�*�*��'�?�?��7�*�*�*�*��&�>�>��'�)�)�)�)��&�>�>��'�)�)�)�)��'�?�?��7�*�*�*�*��-� � �%��0�0�0�0��$�<�<�����)���$�$�$��*���"�n�4�4�4�4��,���$��6�6�6�6��(��� �N�2�2�2�2��(��� �N�2�2�2�2��)���$�$�$��)���$�$�$�$�$r c �� � t D �]$} t d| � � dt | � � fk sJ �t d| � � dk sJ �dD ]U}t dg|z | � � \ }}t |� � g k sJ �t t dg|z | � � � � g k sJ ��Vt | � � }|� d� � dk sJ �|� dd�� � dk sJ �t | � � }|� d� � dk sJ �|� dd�� � dk sJ ���&t t j � � � � D ]}t |� � j |k sJ ��d S )Nr � )r r � T)�final)r r r r r �listr r r �set�valuesr )�label�repeat�output�_�decoder�encoderr s r �test_all_labelsr, 0 s� � �� 5� 5���c�5�!�!�b�&��-�-�%8�8�8�8�8��b�%� � �C�'�'�'�'� � A� A�F�#�S�E�F�N�E�:�:�I�F�A���<�<�2�%�%�%�%���R�D�6�M�5�9�9�:�:�b�@�@�@�@�@�$�U�+�+���~�~�c�"�"�b�(�(�(�(��~�~�c��~�.�.�"�4�4�4�4�$�U�+�+���~�~�b�!�!�S�(�(�(�(��~�~�b��~�-�-��4�4�4�4�4��F�M�O�O�$�$� )� )���d�|�|� �D�(�(�(�(�(�)� )r c �R � t t t dd� � t t t dd� � t t t g d� � t t t g d� � t t t d� � t t t d� � d S )N� é�invalid� é)r �LookupErrorr r r r r r r r r �test_invalid_labelr2 C s � ��+�v�'>� �J�J�J��+�v�t�Y�7�7�7��+�{�B� �:�:�:��+�{�B� �:�:�:��+�1�9�=�=�=��+�1�9�=�=�=�=�=r c �� � t dd� � dt d� � fk sJ �t dt d� � � � dt d� � fk sJ �t dd� � dt d� � fk sJ �t dt � � dt d� � fk sJ �t dd� � dt d� � fk sJ �t d d� � dt d� � fk sJ �t d d� � dt d� � fk sJ �t dd� � dt d � � fk sJ �t dd� � dt d� � fk sJ �t dd� � dt d � � fk sJ �t dd� � dt d� � fk sJ �t dd� � dt d � � fk sJ �t dd� � dt d � � fk sJ �t dd� � dt d� � fk sJ �t dd� � dt d � � fk sJ �t dd� � dt d � � fk sJ �d S )N� �r u €� ér r0 �ascii� ér. � �� �utf-16be� ��� �utf-16les ��� u s �� �� �zUTF-16BE� � zUTF-16LEzUTF-16)r r r r r r �test_decoder>