Current File : //opt/imh-python/lib/python2.7/test/test_base64.pyo
�
��Wc@s}ddlZddlmZddlZdejfd��YZdejfd��YZd�Zedkrye�ndS(	i����N(ttest_supporttLegacyBase64TestCasecBs,eZd�Zd�Zd�Zd�ZRS(cCs�|j}|tjd�d�|tjd�d�|tjd�d�|tjd�d�|tjd	�d	�|tjd
�d�|tjtd��d�dS(Nswww.python.orgsd3d3LnB5dGhvbi5vcmc=
tasYQ==
tabsYWI=
tabcsYWJj
tsRabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#0^&*();:<>,. []{}srYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0
NTY3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ==
(tassertEqualtbase64tencodestringt	bytearray(tselfteq((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyttest_encodestrings	cCs�|j}|tjd�d�|tjd�d�|tjd�d�|tjd�d�|tjd	�d
�|tjd�d�|tjtd��d�dS(Nsd3d3LnB5dGhvbi5vcmc=
swww.python.orgsYQ==
RsYWI=
RsYWJj
RsrYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0
NTY3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ==
sRabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#0^&*();:<>,. []{}R(RRtdecodestringR	(R
R((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyttest_decodestrings	cCsU|j}ddlm}|d�}|�}tj||�||j�d�dS(Ni����(tStringIOsRabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#0^&*();:<>,. []{}srYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0
NTY3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ==
(Rt	cStringIORRtencodetgetvalue(R
RRtinfptoutfp((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyttest_encode(s		cCsOddlm}|d�}|�}tj||�|j|j�d�dS(Ni����(Rsd3d3LnB5dGhvbi5vcmc=swww.python.org(RRRtdecodeRR(R
RRR((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyttest_decode5s
	(t__name__t
__module__RRRR(((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyRs			
tBaseXYTestCasecBsbeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZRS(
cCs�|j}|tjd�d�|tjd�d�|tjd�d�|tjd�d�|tjd	�d
�|tjd�d�|tjd�d
�|tjddd�d�|tjtd��d�|jttjddtd��|tjd�d�|tjd�d�|tjd�d�|tjd	�d
�|tjd�d�|tjd�d
�|tjtd��d�|tjd�d�|tjtd��d�dS(Nswww.python.orgsd3d3LnB5dGhvbi5vcmc=tsAA==RsYQ==RsYWI=RtYWJjRsRabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#0^&*();:<>,. []{}spYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0NTY3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ==s�V�o�taltcharss*$s01a*b$cdtabcdsYWJjZA==s01a-b_cd(RRt	b64encodeR	tassertRaisest	TypeErrortstandard_b64encodeturlsafe_b64encode(R
R((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyttest_b64encode?s.	cCs�|j}|tjd�d�|tjd�d�|tjd�d�|tjd�d�|tjd	�d
�|tjd�d�|tjd
�d
�|tjddd�d�|tjtd	��d
�|tjd�d�|tjd�d�|tjd�d�|tjd	�d
�|tjd
�d
�|tjd�d�|tjtd	��d
�|tjd�d�|tjtd��d�dS(Nsd3d3LnB5dGhvbi5vcmc=swww.python.orgsAA==RsYQ==RsYWI=RRRsqYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0
NTY3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ==sRabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#0^&*();:<>,. []{}Rs01a*b$cdRs*$s�V�o�spYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0NTY3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ==s01a-b_cd(RRt	b64decodeR	tstandard_b64decodeturlsafe_b64decode(R
R((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyttest_b64decodegs*	cCs|jttjd�dS(NR(R R!RR%(R
((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyttest_b64decode_padding_error�sc
Cs�dddddddddf	}x_|D]W\}}|jtj|�|�|jtj|�|�|jtj|�|�q(Wd}|jtjdd�|�|jtjd�|�dS(Ns%3d==s�s$3d==s[==RsYW]3=tams3{d==s3d}==s@@t!s	YWJj
YWI=tabcabs����s++[[//]]s[]s++--//__(s%3d==s�(s$3d==s�(s[==R(sYW]3=R*(s3{d==s�(s3d}==s�(s@@R(R+R(s	YWJj
YWI=R,(RRR%R&R'(R
tteststbstrtres((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyttest_b64decode_invalid_chars�s 	cCs�|j}|tjd�d�|tjd�d�|tjd�d�|tjd�d�|tjd�d	�|tjd
�d�|tjd�d
�|tjtd
��d�dS(NRRsAA======RsME======RsMFRA====RsMFRGG===RsMFRGGZA=tabcdetMFRGGZDF(RRt	b32encodeR	(R
R((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyttest_b32encode�s	cCs�|j}|tjd�d�|tjd�d�|tjd�d�|tjd�d�|tjd�d	�|tjd
�d�|tjd�d
�|jttjtd��dS(NRsAA======RsME======RsMFRA====RsMFRGG===RsMFRGGZA=RR2R1(RRt	b32decodeR R!R	(R
R((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyttest_b32decode�s	cCs�|j}|tjdt�d�|tjdt�d�|tjdt�d�|tjdt�d�|tjdt�d	�|tjd
t�d�|tjdt�d�|tjd
t�d�|tjdt�d�|tjdt�d	�|tjdt�d�|jttjd�|tjd�d�|tjddd�d�|tjddd�d�dS(NRsME======RsMFRA====RsMFRGG===RsMFRGGZA=RR2R1sme======smfra====smfrgg===smfrggza=tmfrggzdftMLO23456sbݭ�tM1023456tmap01tLtIsb��(RRR5tTrueR R!(R
R((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyttest_b32decode_casefold�s 	cCs0|jttjd�|jttjd�dS(NRsABCDEF==(R R!RR5(R
((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyttest_b32decode_error�scCsU|j}|tjd�d�|tjd�d�|tjtd��d�dS(Ns���t
0102ABCDEFRt00(RRt	b16encodeR	(R
R((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyttest_b16encode�s	cCs�|j}|tjd�d�|tjd�d�|jttjd�|tjdt�d�|tjtd��d�|jttjd�|jttjd�dS(NR@s���RARt
0102abcdeft0102AGt010(RRt	b16decodeR R!R=R	(R
R((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyttest_b16decode�s	(RRR$R(R)R0R4R6R>R?RCRH(((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyR>s	(	%							cCstjt�dS(N(Rtrun_unittestR(((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyt	test_main�st__main__(	tunittestttestRRtTestCaseRRRJR(((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_base64.pyt<module>s7�