관리-도구
편집 파일: tests.cpython-36.pyc
3 �Pf� � @ s� d Z ddlmZ ddlmZmZmZmZmZm Z m Z mZmZ dd� Z dd� Zd d � Zdd� Zd d� Zdd� Zdd� Zdd� Zdd� 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 O s4 y|||� W n | k r" d S X t d| ��d S )NzDid not raise %s.)�AssertionError)Z exceptionZfunction�args�kwargs� r �/usr/lib/python3.6/tests.py� assert_raises s r c C s t d�jdkst�t d�jdks$t�t d�jdks6t�t d�jdksHt�t d�jdksZt�t d�jdkslt�t d�jdks~t�t d�d ks�t�t d�d ks�t�t d �jd ks�t�t d�jd ks�t�t d�jd ks�t�t d �jd ks�t�t d�d ks�t�t d�d k�st�d S )Nzutf-8zUtf-8zUTF-8�utf8zutf8 z utf8 �u8u utf-8 zUS-ASCIIzwindows-1252z iso-8859-1�latin1ZLATIN1zlatin-1u LATİN1)r �namer r r r r �test_labels s r c C s x�t D ]�} td| �dt| �fks$t�td| �dks6t�xLdD ]D}tdg| | �\}}t|�g ksdt�ttdg| | ��g ks<t�q<W t| �}|jd�dks�t�|jddd�dks�t�t | �}|jd�dks�t�|jddd�dkst�qW x&t t j� �D ]}t|�j|ks�t�q�W d S ) N� � r r � T)�final)r r r ) r r r r r r �listr r r �set�valuesr )Zlabel�repeat�output�_�decoder�encoderr r r r �test_all_labels0 s r$ c C sT t ttdd� t ttdd� t ttg d� t ttg d� t ttd� t ttd� d S )Ns éZinvalid� é)r �LookupErrorr r r r r r r r r r �test_invalid_labelC s r'