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
O\¬Qc@stddlZddlZddlZddlZddlZddlZddlmZyddlZWne    k
rdZnXej Z dZ erÕdej fd„ƒYZdejfd„ƒYZd„Znejed    ƒd
ejfd „ƒYƒZd efd „ƒYZdejfd„ƒYZdejfd„ƒYZdd„ZedkrpedeƒndS(iÿÿÿÿN(t test_supportsQUIT
t echo_servercBs eZdZd„Zd„ZRS(icCsVtjj|ƒ||_tjtjtjƒ|_tj    |jƒ|_
d|_ dS(N( t    threadingtThreadt__init__teventtsockettAF_INETt SOCK_STREAMtsockRt    bind_porttporttNonetstart_resend_event(tselfR((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyRs
    cCs|jjdƒ|jjƒ|jjƒ\}}d|_x<t|jkry|jdƒ}|sfPn|j||_q>W|jjtdƒ|_|j    r«|j    j
ƒnyJxC|jró|j |j|j  ƒ}t jdƒ|j||_q±WWnnX|jƒ|jjƒdS(Nitgü©ñÒMbP?(R    tlistenRtsettaccepttbuffert SERVER_QUITtrecvtreplaceR twaittsendt
chunk_sizettimetsleeptclose(Rtconntclienttdatatn((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pytruns*           
(t__name__t
__module__RRR!(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyRs        t echo_clientcBsGeZd„Zd„Zejdkr3d„Znd„Zd„ZRS(cCs\tjj|ƒg|_|jtjtjƒ|jt    |fƒ|j
|ƒd|_ dS(NR( tasynchatt
async_chatRtcontentst create_socketRRRtconnecttHOSTtset_terminatorR(Rt
terminatort server_port((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyR@s      cCsdS(N((R((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pythandle_connectHstdarwincCsdS(N((R((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyt handle_exptNscCs|j|7_dS(N(R(RR((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pytcollect_incoming_dataQscCs |jj|jƒd|_dS(NR(R'tappendR(R((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pytfound_terminatorTs(    R"R#RR.tsystplatformR0R1R3(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyR$>s              cCsMtjƒ}t|ƒ}|jƒ|jƒ|jƒtjdƒ||fS(Ng{®Gáz„?(RtEventRtstartRtclearRR(Rts((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pytstart_echo_serverYs  
 
 
 s!Threading required for this test.t TestAsynchatcBsŒeZeZd„Zd„Zd„Zd„Zd„Zd„Z    d„Z
d„Z d„Z d    „Z d
„Zd „Zd „Zd „ZRS(cCstjƒ|_dS(N(Rtthreading_setupt_threads(R((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pytsetUpgscCstj|jŒdS(N(Rtthreading_cleanupR=(R((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyttearDownjscCsàtjƒ}t|ƒ}||_|jƒ|jƒ|jƒtjdƒt    ||j
ƒ}|j dƒ|j d|ƒ|j d|ƒ|j t ƒt jd|jddddƒ|jƒ|j|jd    d
gƒdS( Ng{®Gáz„?shello sworld%ssI'm not dead yet!%stuse_polltcounti,ttimeouts hello worldsI'm not dead yet!(RR6RRR7RR8RRR$R tpushRtasyncoretlooptusepolltjoint assertEqualR'(Rttermt server_chunkRR9tc((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pytline_terminator_checkms      
 
 
 
cCs%xdD]}|jd|ƒqWdS(Niiis
(iii(RM(Rtl((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyttest_line_terminator1ƒs cCs%xdD]}|jd|ƒqWdS(Niiis
(iii(RM(RRN((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyttest_line_terminator2ˆs cCs%xdD]}|jd|ƒqWdS(Niiitqqq(iii(RM(RRN((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyttest_line_terminator3s cCsˆtƒ\}}t||jƒ}d}|j|ƒ|jtƒtjd|jddddƒ|jƒ|j    |j
|| gƒdS(Nshello world, I'm not dead yet!
RARBi,RCg{®Gáz„?( R:R$R RDRRERFRGRHRIR'(RttermlenR9RRLR((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pytnumeric_terminator_check’s  
cCs|jdƒ|jdƒdS(Nil(RT(R((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyttest_numeric_terminator1žs cCs|jdƒdS(Nl(RT(R((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyttest_numeric_terminator2¤scCs”tƒ\}}td|jƒ}d}|j|ƒ|jtƒtjd|jddddƒ|j    ƒ|j
|j gƒ|j
|j |ƒdS(Nshello world, I'm not dead yet!
RARBi,RCg{®Gáz„?( R:R$R R RDRRERFRGRHRIR'R(RR9RRLR((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyttest_none_terminator§s  
cCs“tƒ\}}td|jƒ}d}tj|tddƒ}|j|ƒtjd|j    dddd    ƒ|j
ƒ|j |j d
d gƒdS( Ns
shello world
I'm not dead yet!
t buffer_sizeiRARBi,RCg{®Gáz„?s hello worldsI'm not dead yet!( R:R$R R%tsimple_producerRtpush_with_producerRERFRGRHRIR'(RR9RRLRtp((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyttest_simple_producer´s 
cCs~tƒ\}}td|jƒ}d}|j|tƒtjd|jddddƒ|jƒ|j    |j
dd    gƒdS(
Ns
shello world
I'm not dead yet!
RARBi,RCg{®Gáz„?s hello worldsI'm not dead yet!( R:R$R RZRRERFRGRHRIR'(RR9RRLR((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyttest_string_producer¿s
cCs„tƒ\}}td|jƒ}|jdƒ|jtƒtjd|jddddƒ|jƒ|j    |j
dd    d
gƒdS( Ns
shello world
 
I'm not dead yet!
RARBi,RCg{®Gáz„?s hello worldRsI'm not dead yet!( R:R$R RDRRERFRGRHRIR'(RR9RRL((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyttest_empty_lineÉs  
cCs½tƒ\}}tjƒ|_td|jƒ}|jdƒ|jtƒ|jƒt    j
d|j ddddƒ|jj ƒ|j ƒ|j|jgƒ|jt|jƒdkƒdS(    Ns
shello world
I'm not dead yet!
RARBi,RCg{®Gáz„?i(R:RR6R R$R RDRtclose_when_doneRERFRGRRHRIR't
assertTruetlenR(RR9RRL((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyttest_close_when_doneÔs  
 
(R"R#tFalseRGR>R@RMRORPRRRTRURVRWR\R]R^Rb(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyR;cs                                                
    tTestAsynchat_WithPollcBseZeZRS((R"R#tTrueRG(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyRdëstTestHelperFunctionscBseZd„ZRS(cCs<|jtjddƒdƒ|jtjddƒdƒdS(Nsqwerty s
it
qwertydkjfi(RIR%tfind_prefix_at_end(R((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyttest_find_prefix_at_endïs(R"R#Ri(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyRfîstTestFifocBseZd„Zd„ZRS(cCstjƒ}|jdƒ|jdƒ|jt|ƒdƒ|j|jƒdƒ|j|jƒdƒ|jt|ƒdƒ|j|jƒdƒ|j|jƒtƒ|j|jƒdƒ|jt|ƒdƒ|j|jƒt    ƒ|j|jƒdƒdS(    Nitaiii(ii(iRk(iN( R%tfifoRDRIRatfirsttpoptis_emptyRcReR (Rtf((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyt
test_basicôs   cCsŠtjdddgƒ}|jt|ƒdƒ|j|jƒdƒ|j|jƒdƒ|j|jƒdƒ|j|jƒd    ƒdS(
Ntxiiii(iRr(ii(ii(iN(R%RlRIRaRnR (RRp((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyttest_given_lists (R"R#RqRs(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyRjós    cCstjttttƒdS(N(Rt run_unittestR;RdRfRj(tverbose((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyt    test_main s t__main__Ru(RER%RRtunittestR4ttestRRt ImportErrorR R*RRRR&R$R:t
skipUnlesstTestCaseR;RdRfRjRvR"Re(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_asynchat.pyt<module>s*0   
    .
‡