| Server IP : 118.27.122.248 / Your IP : 216.73.216.15 Web Server : Apache System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64 User : c9415830 ( 11735) PHP Version : 8.4.17 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python36/lib64/python3.6/test/__pycache__/ |
Upload File : |
3
�w2_� � @ sP d Z ddlZddlZdd� Zeje� dZG dd� dej�ZedkrLej � dS ) z� Python character mapping codec test
This uses the test codec in testcodec.py and thus also tests the
encodings package lookup scheme.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright 2000 Guido van Rossum.
� Nc C s$ | dkr ddl m} t|j� �S d S )N� testcodecr )r )Ztestr �tuple�getregentry)�encodingr � r �;/opt/alt/python36/lib64/python3.6/test/test_charmapcodec.py�codec_search_function s r r c @ s, e Zd Zdd� Zdd� Zdd� Zdd� Zd S )
�CharmapCodecTestc C s^ | j tdt�d� | j tdt�d� | j tdt�d� | j tdt�d� | j td t�d
� d S )Ns abc�abcs xdefZabcdefs defxZdefabcs dxfZdabcfs dxfxZdabcfabc)�assertEqual�str� codecname)�selfr r r �test_constructorx s
z"CharmapCodecTest.test_constructorxc C s^ | j djt�d� | j djt�d� | j djt�d� | j djt�d� | j d jt�d
� d S )Nr
s abcZxdefs abcdefZdefxs defabcZdxfs dabcfZdxfxs dabcfabc)r �encoder
)r r r r �test_encodex$ s
zCharmapCodecTest.test_encodexc C sL | j tdt�d� | j tdt�d� | j tdt�d� | j tdt�d� d S )Ns ydef�defs defys dyfZdfs dyfy)r r r
)r r r r �test_constructory+ s z"CharmapCodecTest.test_constructoryc C s | j ttdt� d S )Ns abc)ZassertRaises�UnicodeErrorr r
)r r r r �test_maptoundefined1 s z$CharmapCodecTest.test_maptoundefinedN)�__name__�
__module__�__qualname__r r r r r r r r r s r �__main__)
�__doc__Zunittest�codecsr �registerr
ZTestCaser r �mainr r r r �<module>
s