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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
S\¬Qc@sqddlZddlmZmZmZmZmZddlZddlZddlm    Z    m
Z
m Z ddl Z yddl Z Wnek
reZ nXedƒZdejfd„ƒYZdejfd„ƒYZd    efd
„ƒYZd eejfd „ƒYZd eejfd„ƒYZded„Zeed„ZdZd„ZedkrmeƒndS(iÿÿÿÿN(tTESTFNt run_unittestt import_moduletunlinktrequires(tprecisionbigmemtestt_1Gt_4GtzlibtChecksumTestCasecBsYeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z    d„Z
RS(    cCsB|jtjdƒtjddƒƒ|jtjddƒƒdS(NtitabcIÿÿÿÿ(t assertEqualRtcrc32t
assertTrue(tself((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_crc32starts%cCsX|jtjddƒdƒ|jtjddƒdƒ|jtjddƒdƒdS(NR
iii°(R RR (R((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_crc32emptyscCsB|jtjdƒtjddƒƒ|jtjddƒƒdS(NR
iR Iÿÿÿÿ(R Rtadler32R(R((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_adler32starts%cCsX|jtjddƒdƒ|jtjddƒdƒ|jtjddƒdƒdS(NR
iii°(R RR(R((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_adler32emptyscCs|j|d@|d@ƒdS(Nlÿÿ(R (Rtseentexpected((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyt assertEqual32$scCs¾|jtjddƒdƒ|jtjddƒdƒ|jtjddƒdƒ|jtjddƒdƒ|jtjdƒtjddƒƒ|jtjdƒtjddƒƒdS(Ntpenguinil !ƒKii”ª¶CiöÏ i÷Ö (RRR RR (R((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyt test_penguins)s %cCsrd}|jtj|ƒdƒ|jtjdƒdƒ|jtj||ƒdƒ|jtjdƒdƒdS(s7test issue1202 compliance: signed crc32, adler32 in 2.xtabcdefghijklmnopi“À:”tspami=ÿÚCi Õi²ON(R RR R(Rtfoo((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_abcdefghijklmnop2s
cCsNd}|jtj|ƒtj|ƒƒ|jtjdƒtjdƒƒdS(NRR(R tbinasciiR R(RR((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_same_as_binascii_crc32;s"cCs||jtjddƒtjddƒƒ|jtjddƒtjddƒƒ|jtjdd
ƒtjdd ƒƒdS( NthamiÿÿÿÿlÿÿRi'Ðÿl' iiI€i€I€(R RR (R((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_negative_crc_iv_input@s
(( t__name__t
__module__RRRRRRRRR!(((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyR    s                                        tExceptionTestCasecBs,eZd„Zd„Zd„Zd„ZRS(cCs |jtjtjddƒdS(NtERRORi
(t assertRaisesRterrortcompress(R((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyt test_badlevelMscCsI|jttjdtjdƒ|jttjdtjtjdƒdS(Nii(R&t
ValueErrorRt compressobjtDEFLATEDt    MAX_WBITS(R((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_badcompressobjSs    cCs|jttjdƒdS(Niÿÿÿÿ(R&R*Rt decompressobj(R((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_baddecompressobjZscCs<|jttjƒjdƒ|jttjƒjdƒdS(Niiÿÿÿÿ(R&R*RR/tflush(R((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_decompressobj_badflush^s(R"R#R)R.R0R2(((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyR$Ks            tBaseCompressTestCasecBseZd„Zd„ZRS(cCsŠd}dd|}djgtdƒD]&}tj|tjd|ƒƒ^q'ƒ}||t|ƒd}z||ƒWdd}XdS(    Nis%%0%dxiR
i
iii(tjointrangeRta2b_hextrandomt getrandbitstlentNone(Rtsizet compress_funct_1Mtfmttitdata((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pytcheck_big_compress_bufferes    9cCs}d|}ztj|dƒ}Wdd}X||ƒ}z9|jt|ƒ|ƒ|jt|jdƒƒdƒWdd}XdS(Ntxii(RR(R:R R9tstrip(RR;tdecompress_funcR@t
compressed((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pytcheck_big_decompress_bufferts
 #(R"R#RARF(((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyR3ds    tCompressTestCasecBsgeZd„Zd„Zd„Zeded
ddƒd„ƒZeded ddƒd    „ƒZRS( cCs,tjtƒ}|jtj|ƒtƒdS(N(RR(t HAMLET_SCENER t
decompress(RRB((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyt test_speech†scCs6td}tj|ƒ}|jtj|ƒ|ƒdS(Ni€(RHRR(R RI(RR@RB((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_speech128Šs
cCs3tjtƒ}|jtjdtj|d ƒdS(NsAError -5 while decompressing data: incomplete or truncated streamiÿÿÿÿ(RR(RHtassertRaisesRegexpR'RI(RRB((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_incomplete_streams R;itmemuseicCsd„}|j||ƒdS(NcSstj|dƒS(Ni(RR((ts((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyt<lambda>›s(RA(RR;R(((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_big_compress_buffer™s    icCs|j|tjƒdS(N(RFRRI(RR;((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_big_decompress_bufferžsii(    R"R#RJRKRMRRRQRR(((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyRG„s
                "tCompressObjectTestCasecBsHeZd„Zd„Zd„Zedddd„Zd„Zdddd„Z    ed„Z
d    „Z d
„Z d „Z d „Zd „Zd„Zd„Zd„ZeejƒdƒrÏd„Zd„Znd„Zeejƒdƒrd„Zd„Znededddƒd„ƒZeded ddƒd„ƒZRS(!cCsŠtd}tjƒ}|j|ƒ}|jƒ}|jtj|jƒtjƒ}|j||ƒ}|jƒ}|j    |||ƒdS(Ni€(
RHRR+R(R1R&R'R/RIR (RR@tcotx1tx2tdcoty1ty2((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyt    test_pair¥s
    c Cs d}tj}d}d}tj}tj|||||ƒ}|jtƒ}|jƒ}tj|ƒ}    |    j||ƒ}
|    jƒ} |j    t|
| ƒdS(Niiôÿÿÿi    (
RR,t
Z_FILTEREDR+R(RHR1R/RIR ( RtleveltmethodtwbitstmemleveltstrategyRTRURVRWRXRY((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_compressoptions±s          c    CsÊtd}tjƒ}g}xAtdt|ƒdƒD]'}|j|j|||d!ƒƒq5W|j|jƒƒdj|ƒ}tj    ƒ}|j
dj|ƒƒ}|jƒ}|j |||ƒdS(Ni€iiR
( RHRR+R5R9tappendR(R1R4R/RIR (    RR@RTtbufsR?tcombufRWRXRY((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_compressincrementalÀs
 %  ii@c Cs¯|p    t}|d}tjƒ}g}xAtdt|ƒ|ƒD]'}|j|j||||!ƒƒqAW|j|jƒƒdj|ƒ}    |j    |tj
|    ƒƒtj ƒ}
g}xdtdt|    ƒ|ƒD]J}|j|
j
|    |||!ƒƒ|j    d|
j dt|
j ƒƒqÒW|r<|j|
jƒƒn3x0t rn|
j
dƒ} | rj|j| ƒq?Pq?W|j    d|
j dt|
j ƒƒ|j    |dj|ƒƒdS(Ni€iR
s!(A) uct should be '': not %d longs!(B) uct should be '': not %d long(RHRR+R5R9RbR(R1R4R RIR/tunconsumed_tailtTrue( RR1tsourcetcxtdcxR@RTRcR?RdRWtchunk((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_decompincÏs6 
 % !    cCs|jdtƒdS(NR1(RlRg(R((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_decompincflushòsc CsV|p    t}|d}tjƒ}g}xAtdt|ƒ|ƒD]'}|j|j||||!ƒƒqAW|j|jƒƒdj|ƒ}|j    |tj
|ƒdƒtj ƒ}    g}|}
x^|
r"|    j
|
|ƒ} |j t| ƒ|kdt| ƒ|fƒ|j| ƒ|    j }
qÅW|j|    jƒƒ|j    |dj|ƒdƒdS(Ni€iR
scompressed data failureschunk too big (%d>%d)sWrong data retrieved(RHRR+R5R9RbR(R1R4R RIR/t assertFalseRf( RRhRiRjR@RTRcR?RdRWtcbRk((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_decompimaxõs* 
 %       c Cs¿td}tjƒ}g}xAtdt|ƒdƒD]'}|j|j|||d!ƒƒq5W|j|jƒƒdj|ƒ}|j    |tj
|ƒdƒtj ƒ}g}|}xr|r*dt|ƒd}    |j
||    ƒ}
|j t|
ƒ|    kdt|
ƒ|    fƒ|j|
ƒ|j }q¹W|rG|j|jƒƒnXxU|
rž|j
d|    ƒ}
|j t|
ƒ|    kdt|
ƒ|    fƒ|j|
ƒqJW|j    |dj|ƒd    ƒdS(
Ni€iiR
scompressed data failureii
schunk too big (%d>%d)sWrong data retrieved(RHRR+R5R9RbR(R1R4R RIR/RnRf( RR1R@RTRcR?RdRWRot
max_lengthRk((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_decompressmaxlens6
 %           cCs|jdtƒdS(NR1(RrRg(R((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_decompressmaxlenflush0scCs<tjƒ}|jt|jddƒ|jd|jƒdS(NR
iÿÿÿÿ(RR/R&R*RIR Rf(RRW((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_maxlenmisc3s cCsQd}tjƒ}|j|dƒ}||j|jƒ7}|j|jdƒdS(Ns
xœKLJMiR
(RR/RIRfR (RtcdataRWtddata((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_clear_unconsumed_tail9s
 c    Csdddg}g|D]$}tt|ƒrtt|ƒ^q}td}x³|D]«}x¢tdƒD]”}tj|ƒ}|j|d ƒ}|j|ƒ}|j|dƒ}    |jƒ}
|jtj    dj
|||    |
gƒƒ|d||fƒ~qdWqQWdS(    Nt
Z_NO_FLUSHt Z_SYNC_FLUSHt Z_FULL_FLUSHii
i¸ R
s*Decompress failed: flush mode=%i, level=%i( thasattrRtgetattrRHR5R+R(R1R RIR4( Rtsync_opttoptR@tsyncR\tobjtatbtctd((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyt test_flushesBs $
  'c    Cs÷ddl}ttdƒrótjtjƒ}tjƒ}y|jƒ}Wn;tk
r†y|jƒ}Wq‡tk
r‚|}q‡XnX|j    dƒt
ddd|ƒ}|j |ƒ}|j tj ƒ}|j||ƒ}|j||dƒndS(    NiÿÿÿÿRyiiit    generators17K random source doesn't matchiD(R7R{RR+tZ_BEST_COMPRESSIONR/t WichmannHilltAttributeErrortRandomtseedtgenblockR(R1RyRIR (    RR7RTRWtgenR@tfirsttsecondtexpanded((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_odd_flushVs"     cCsKtjtjƒ}|j|jƒƒtjƒ}|j|jƒdƒdS(NR
(RR+R‡RR1R/R (RRTRW((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_empty_flushxs cCsd}|jtj|ƒdƒ|jtjtj|d ƒtjƒ}|j|d ƒ}||jƒ7}|j|dƒdS(Ns xœKËÏ‚ERiûÿÿÿ(R RRIR&R'R/R1(RRBRWty((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyt!test_decompress_incomplete_stream‚s cCsgd}d}tj|ƒ}tjƒ}|j|dƒ~tj|ƒ}|j|jƒ|dƒdS(NtabcdefghijklmnopqrstuvwxyztQWERTYUIOPASDFGHJKLZXCVBNMi(RR(R/RIR R1(Rtinput1tinput2R@RW((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_flush_with_freed_inputs tcopyc    Cst}tjƒ}tjtjƒ}g}|j|j|ƒƒ|jƒ}|}|j|j|ƒƒ|j|jƒƒdj    |ƒ}|j|j|ƒƒ|j|jƒƒdj    |ƒ}|j
tj |ƒ||ƒ|j
tj |ƒ||ƒdS(NR
( RHtswapcaseRR+R‡RbR(RšR1R4R RI(    Rtdata0tdata1tc0tbufs0tc1tbufs1ts0ts1((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_compresscopyœs  cCs:tjƒ}|jtƒ|jƒ|jt|jƒdS(N(RR+R(RHR1R&R*Rš(RRƒ((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_badcompresscopy²s  
c
 
Csnd}d}tj|ƒ}||}xBdD]:}x1ddt|ƒt|ƒfD]}tjƒ}d}x°tdt|ƒ|ƒD]–}    |    t|ƒkr°|j|jdƒn|dkrð||j||    |    |!ƒ7}|j|jdƒq‚||j|j||    |    |!|ƒ7}q‚W||j    ƒ7}|j||ƒ|j|jdƒ|j|j|ƒqQWq,WdS(    NR•t
0123456789iièiiR
(iiè(
RR(R9R/R5R t unused_dataRIRfR1(
RRht    remainderR“RBtmaxlentstepRWR@R?((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_decompress_unused_data¹s(
 %      #c    CsÊt}tj|ƒ}tjƒ}g}|j|j|d ƒƒ|jƒ}|}|j|j|dƒƒdj|ƒ}|j|j|dƒƒdj|ƒ}|j||ƒ|j||ƒdS(Ni R
(    RHRR(R/RbRIRšR4R (    RR@tcomptd0RŸtd1R¡R¢R£((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_decompresscopyÓs  cCsItjtƒ}tjƒ}|j|ƒ|jƒ|jt|jƒdS(N(    RR(RHR/RIR1R&R*Rš(RR@R„((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyttest_baddecompresscopyès
 
R;iRNics2tjdƒ‰‡fd†}|j||ƒdS(Nicsˆj|ƒˆjƒS(N(R(R1(RO(Rƒ(sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyRPõs(RR+RA(RR;R(((RƒsV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyRQòsics/tjƒ‰‡fd†}|j||ƒdS(Ncsˆj|ƒˆjƒS(N(RIR1(RO(R„(sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyRPûs(RR/RF(RR;RI((R„sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyRRøs Nii( R"R#RZRaRetFalseR:RlRmRpRrRsRtRwR…R‘R’R”R™R{RR+R¤R¥R«R/R¯R°RRRQRR(((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyRS£s0            #                              "    
                     
"ic
Cs¸|dk    r|j|ƒn|j}||ks=|dkrF|}ng}xXtd||ƒD]D}|jdjgt|ƒD]}t|ddƒƒ^q~ƒƒq_Wdj|ƒ| S(sDlength-byte stream of random data from a seed (in step-byte blocks).iiR
iÿN(R:R‹trandintR5RbR4tchr(R‹tlengthRªR†R²tblocksR?RB((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyRŒÿs         3cCsQ|dk    r|j|ƒn|jdƒ}gt|ƒD]}|j|ƒ^q8S(s=Return a list of number lines randomly chosen from the sources
N(R:R‹tsplitR5tchoice(RhtnumberR‹R†tsourcestn((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyt choose_liness s
LAERTES
 
       O, fear me not.
       I stay too long: but here my father comes.
 
       Enter POLONIUS
 
       A double blessing is a double grace,
       Occasion smiles upon a second leave.
 
LORD POLONIUS
 
       Yet here, Laertes! aboard, aboard, for shame!
       The wind sits in the shoulder of your sail,
       And you are stay'd for. There; my blessing with thee!
       And these few precepts in thy memory
       See thou character. Give thy thoughts no tongue,
       Nor any unproportioned thought his act.
       Be thou familiar, but by no means vulgar.
       Those friends thou hast, and their adoption tried,
       Grapple them to thy soul with hoops of steel;
       But do not dull thy palm with entertainment
       Of each new-hatch'd, unfledged comrade. Beware
       Of entrance to a quarrel, but being in,
       Bear't that the opposed may beware of thee.
       Give every man thy ear, but few thy voice;
       Take each man's censure, but reserve thy judgment.
       Costly thy habit as thy purse can buy,
       But not express'd in fancy; rich, not gaudy;
       For the apparel oft proclaims the man,
       And they in France of the best rank and station
       Are of a most select and generous chief in that.
       Neither a borrower nor a lender be;
       For loan oft loses both itself and friend,
       And borrowing dulls the edge of husbandry.
       This above all: to thine ownself be true,
       And it must follow, as the night the day,
       Thou canst not then be false to any man.
       Farewell: my blessing season this in thee!
 
LAERTES
 
       Most humbly do I take my leave, my lord.
 
LORD POLONIUS
 
       The time invites you; go; your servants tend.
 
LAERTES
 
       Farewell, Ophelia; and remember well
       What I have said to you.
 
OPHELIA
 
       'Tis in my memory lock'd,
       And you yourself shall keep the key of it.
 
LAERTES
 
       Farewell.
cCstttttƒdS(N(RR    R$RGRS(((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyt    test_mainXs
t__main__(tunittestttest.test_supportRRRRRRR7RRRtsystmmapt ImportErrorR:RtTestCaseR    R$tobjectR3RGRSRŒR»RHR¼R"(((sV/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_zlib.pyt<module>s, (    
 ; ÿ]G