tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
O\¬Qc@sdZddlmZddlZddlZddlZdddddd    d
gZd d d ddddgZeeddgZdej    fd„ƒYZ
de
fd„ƒYZ de
fd„ƒYZ de
fd„ƒYZ d„ZedkrþeƒndS(sTest the binascii C module.iÿÿÿÿ(t test_supportNt
b2a_base64tb2a_hextb2a_hqxtb2a_qptb2a_uuthexlifyt rlecode_hqxt
a2b_base64ta2b_hexta2b_hqxta2b_qpta2b_uut    unhexlifyt rledecode_hqxtcrc32tcrc_hqxt BinASCIITestcBs¬eZeZdZedjeeedƒƒƒ7Zed7Zd„Z    d„Z
d„Z d„Z d„Z d    „Zd
„Zd „Zd „Zd „Zd„Zd„ZRS(s.The quick brown fox jumps over the lazy dog.
tis
Hello world.
cCs|j|jƒ|_dS(N(t    type2testtrawdatatdata(tself((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pytsetUpscCs6|jttjtƒƒ|jttjtƒƒdS(N(t
assertTruet
issubclasstbinasciitErrort    Exceptiont
Incomplete(R((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyttest_exceptionsscCsMxFtD]>}|jttt|ƒdƒƒ|jttt|ƒƒqWdS(Nt__call__(t all_functionsRthasattrtgetattrRt assertRaisest    TypeError(Rtname((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyttest_functions!s c    Csjd}|j| }xtttƒD]
\}}tt|ƒ}tt|ƒ}y.||j|ƒƒ}||j|ƒƒ}Wn/tk
r¬}    |jdj    |||    ƒƒnX|dkrÈ|\}}
n|j
||dj    ||||ƒƒ|j |t ƒ|j |t ƒ|j td„|Dƒƒdƒq#W|j tj|dƒtƒ|j tj|ƒtƒdS(Ni-s{}/{} conversion raises {!r}Rs{}/{} conversion: {!r} != {!r}css|]}t|ƒVqdS(N(tord(t.0tc((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pys    <genexpr>:si€i(Rtzipt a2b_functionst b2a_functionsR"RRRtfailtformatt assertEqualtassertIsInstancetstrt
assertLesstmaxRtintR( RtMAX_ALLtrawtfatfbta2btb2atatresterrt_((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyttest_returned_value's&   $cCsÁd}g}x\tdt|jƒ|ƒD]?}|j|j|||!ƒ}tj|ƒ}|j|ƒq(Wd}x6|D].}|j|ƒ}tj|ƒ}||}qxW|j||jƒdS(Ni9iR(    trangetlenRRRRtappendRR/(Rt
MAX_BASE64tlinestitbR;R<tline((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyttest_base64valid>s" c sCd}g}x\tdt|jƒ|ƒD]?}|j|j|||!ƒ}tj|ƒ}|j|ƒq(Wd‰d}x9tdƒD]+}t    |ƒ}||kr„ˆ|7‰q„q„W‡fd†}d}    x?t
||ƒD].}
|j|
ƒ}tj |ƒ}|    |7}    qØW|j |    |jƒ|j tj |jˆƒƒdƒdS(Ni9iRs@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/ics”ˆ}t|ƒt|ƒ}d}xc|r‡|r‡t|ƒt|ƒ|kre|d|d}}n|d|d}}||7}q%W|||S(NRii(RA(RGtnoisetratioR<R)(tfillers(sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pytaddnoise]s( R@RARRRRRRBtxrangetchrtmapRR/( RRCRDRERFR;tvalidR)RLR<RG((RKsZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyttest_base64invalidMs("   cCs€d}g}x\tdt|jƒ|ƒD]?}|j|j|||!ƒ}tj|ƒ}|j|ƒq(Wd}x6|D].}|j|ƒ}tj|ƒ}||7}qxW|j    ||jƒ|j    tjdƒddƒ|j    tjdƒddƒ|j    tjd    ƒddƒ|j
tj tjd
ƒ|j
tj tjd ƒ|j
tj tjd d ƒ|j    tjdƒdƒdS(Ni-iRstis€i sÿsÿs!!!!i.t!txs!>   
( R@RARRRRRRBR R/R#R(RtMAX_UURDRERFR;R<RG((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyttest_uuss&" cCsZtj|jdƒƒ}tj|jdƒ|ƒ}|j|dƒ|jttjƒdS(NsTest the CRC-32 ofs  this string.ijë¦](RRRR/R#R$(Rtcrc((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyt
test_crc32ŒscCsntj|jƒ}tj|j|ƒƒ}tj|j|ƒƒ\}}tj|ƒ}|j||jƒdS(N(    RRRRRR
RR/R(RtrleR;RFR>R<((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyttest_hqx“s
cCs°d}tj|j|ƒƒ}tj|j|ƒƒ}|j||ƒ|jttj|d ƒ|jttj|d dƒtjr¬|jtj    t
ddƒƒdƒndS(Ns {sworldishelloi0iÿÿÿÿtqR;tasciit61( RRRR    R/R#R$Rt have_unicodeRtunicode(Rtstttu((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyttest_hexs    cCsºytjdidd6Wntk
r.nX|jdƒ|jtjdƒdƒ|jtjdƒdƒ|jtjdƒdƒ|jttjdd    ƒ|jtjd
ƒd ƒ|jtjd ƒd ƒ|jtjdddƒdddƒ|jtjdƒdƒ|jtjddtƒdƒ|jtjdƒdƒ|jtjddtƒdƒ|jtjdƒdƒ|jtjdƒdƒ|jtjdƒdƒdS(NRis/binascii.a2b_qp(**{1:1}) didn't raise TypeErrors= s==t=s=AXtfootbars=00
=00t
sÿ
ÿ
ÿs =FF
=FF
=FFt0iKsÿ
ÿ
ÿs=
=FF
=FF
=FFt
s=00
t    quotetabss    foo    bar    
s foo    bar=09
s foo=09bar=09
t.s=2Es.
s=2E
sa.
(RR R$R-R/R#RtTrue(R((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyttest_qpªs.   cCs•|jdƒ}xtD]w}|dkr>tj|dƒqntt|ƒ}y||ƒWqtk
rŒ}|jdj|||ƒƒqXqWdS(NRRis{}({!r}) raises {!r}(RR RRR"RR-R.(RtemptytfunctfR=((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyttest_empty_stringÉs  (t__name__t
__module__R1RRtjoinRORNRMRRR&R?RHRQRVRXRZRcRmRq(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyRs "
                        &            
       tArrayBinASCIITestcBseZd„ZRS(cCstjd|ƒS(NR)(tarray(RR`((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyRÙs(RrRsR(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyRuØstBytearrayBinASCIITestcBseZeZRS((RrRst    bytearrayR(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyRwÝstMemoryviewBinASCIITestcBseZeZRS((RrRst
memoryviewR(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyRyáscCstjttttƒdS(N(Rt run_unittestRRuRwRy(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyt    test_mainås    t__main__(t__doc__ttestRtunittestRRvR,R+R tTestCaseRRuRwRyR|Rr(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_binascii.pyt<module>s      È