ó {fc@sddlZddlZddlmZmZddlmZdefd„ƒYZ de e fd„ƒYZ de e fd „ƒYZ d e efd „ƒYZd dd „ƒYZdejfd„ƒYZdejfd„ƒYZd„ZedkreƒndS(iÿÿÿÿN(tPseudoInputFiletPseudoOutputFile(t test_supporttBasecBs>eZd„Zd„Zd„Zd„Zd„Zd„ZRS(cCsdt|ƒjS(Ns%s:str(ttypet__name__(tself((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyt__str__scCsdt|ƒjS(Ns %s:unicode(RR(R((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyt __unicode__ scCsdS(Ni((R((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyt__len__ scCs tdƒS(Ntabc(titer(R((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyt__iter__scGsdt|ƒjS(Ns%s:item(RR(Rtargs((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyt __getitem__scGsdt|ƒjS(Ns%s:slice(RR(RR ((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyt __getslice__s(Rt __module__RRR R RR(((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyRs      tScBseZRS((RR(((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyRstUcBseZRS((RR(((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyRstBAcBseZRS((RR(((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyRst MockShellcBs>eZd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs|jƒdS(N(treset(R((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyt__init__scGs|jj|ƒdS(N(twrittentappend(RR ((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pytwrite"scCs |jjƒS(N(tlinestpop(R((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pytreadline%scCsdS(N((R((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pytclose(scCs g|_dS(N(R(R((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyR+scCs t|ƒddd…|_dS(Niÿÿÿÿ(tlistR(RR((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pytpush.s(RRRRRRRR(((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyRs      tPseudeOutputFilesTestcBs5eZd„Zd„Zd„Zd„Zd„ZRS(cCsÔtƒ}t|ddƒ}|j|tjƒ|j|jdƒ|j|jƒ|j|j ƒ|j|j dƒ|j |j ƒ|j |jƒƒ|j |jƒƒ|j |jƒƒ|j |jƒƒdS(Ntstdoutsutf-8s(RRtassertIsInstancetiot TextIOBaset assertEqualtencodingt assertIsNoneterrorstnewlinestnamet assertFalsetclosedt assertTruetisattytreadabletwritabletseekable(Rtshelltf((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyt test_misc3s cCs‡tƒ}t|ddƒ}|jt|jƒ|jt|jƒ|jt|jdƒ|jt|jdƒ|jt|jdƒdS(NR!sutf-8i( RRt assertRaisestIOErrortfilenottelltseektreadR(RR2R3((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyttest_unsupportedAs cCstƒ}t|ddƒ}|jdƒ|j|jd gƒ|jƒ|jdƒ|j|jd gƒ|jƒ|jdƒ|j|jd gƒ|jƒ|jtdƒƒ|j|jd gƒ|jt|jddƒtƒ|jƒ|jt dƒƒ|j|jd gƒ|jt|jddƒtƒ|jƒ|jt dƒƒ|j|jdgƒ|jt|jddƒt ƒ|jƒ|j t |jƒ|j|jgƒ|j t |jdƒ|j|jgƒ|j t |jddƒ|j|jgƒdS(NR!sutf-8tteststèstutèstii{tspam(R<R!(stèstR!(utèstR!(stèstR!(stèstR!(utèstR!(RRRR%RRRRtstrRRtunicodeR5t TypeError(RR2R3((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyt test_writeJs:       ! ! ! cCs—tƒ}t|ddƒ}|jgƒ|j|jgƒ|jƒ|jddgƒ|j|jd dgƒ|jƒ|jddgƒ|j|jddgƒ|jƒ|jddgƒ|j|jddgƒ|jƒ|jtd ƒgƒ|j|jdgƒ|jt|jd d ƒtƒ|jƒ|jt d ƒgƒ|j|jdgƒ|jt|jd d ƒtƒ|jƒ|jt d ƒgƒ|j|jdgƒ|jt|jd d ƒt ƒ|jƒ|j t |jƒ|j|jgƒ|j t |jd ƒ|j|jgƒ|j t |jd gƒ|j|jgƒ|j t |jggƒ|j|jgƒdS(NR!sutf-8sone ttwosonè stwòuonè utwòstèstiutèsti{(sone R!(RBR!(sonè R!(stwòR!(uonè R!(utwòR!(stèstR!(stèstR!(utèstR!(RRt writelinesR%RRRRR>RRR?R5R@(RR2R3((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyttest_writelinesksJ            ! ! ! cCs¢tƒ}t|ddƒ}|j|jƒ|jdƒ|jƒ|j|jƒ|jt|jdƒ|j |j dgƒ|jƒ|jt |jdƒdS(NR!sutf-8R<txi(R<R!( RRR+R,RRR-R5t ValueErrorR%RR@(RR2R3((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyt test_close”s    (RRR4R;RARDRG(((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyR 2s   ! )tPseudeInputFilesTestcBs>eZd„Zd„Zd„Zd„Zd„Zd„ZRS(cCsÔtƒ}t|ddƒ}|j|tjƒ|j|jdƒ|j|jƒ|j|j ƒ|j|j dƒ|j |j ƒ|j |jƒƒ|j |jƒƒ|j |jƒƒ|j |jƒƒdS(Ntstdinsutf-8s(RRR"R#R$R%R&R'R(R)R*R+R,R-R.R/R0R1(RR2R3((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyR4¢s cCsŠtƒ}t|ddƒ}|jt|jƒ|jt|jƒ|jt|jdƒ|jt|jdƒ|jt|jdgƒdS(NRIsutf-8iRE( RRR5R6R7R8R9RRC(RR2R3((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyR;°s cCs~tƒ}t|ddƒ}|jdddgƒ|j|jƒdƒ|jdddgƒ|j|jdƒdƒ|jdddgƒ|j|jdƒdƒ|jddddgƒ|j|jd ƒd ƒ|j|jd ƒd ƒ|j|jd ƒdƒ|jddgƒ|j|jdƒdƒ|jt|jdƒ|jt|jdƒ|jt|jddƒdS(NRIsutf-8sone stwo tsone two iÿÿÿÿsthree itonise ti s wo three igø?t1i(RRRR%R:tNoneR5R@(RR2R3((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyt test_read¹s" cCsétƒ}t|ddƒ}|jddddgƒ|j|jƒdƒ|j|jdƒdƒ|j|jdƒdƒ|jdgƒ|j|jƒdƒ|j|jƒdƒ|jd d d gƒ|j|jƒd ƒ|j|jƒd ƒ|jdddgƒ|j|jd ƒd ƒ|j|jdƒdƒ|j|jdƒdƒ|j|jdƒdƒ|jddgƒ|j|jdƒdƒ|jt|jdƒ|jt|jdƒ|jt|jddƒdS(NRIsutf-8sone stwo sthree sfour iÿÿÿÿsone two toneRBtthreeiRKites i iRJgø?RL( RRRR%RRMR5R@t readlines(RR2R3((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyt test_readlineÍs, cCs²tƒ}t|ddƒ}|jdddgƒ|j|jƒddgƒ|jdddgƒ|j|jdƒddgƒ|jdddgƒ|j|jdƒddgƒ|jdddgƒ|j|jdƒddgƒ|jdddgƒ|j|jdƒdgƒ|jdddgƒ|j|jd ƒddgƒ|jdddgƒ|jt|jd ƒ|jt|jd ƒ|jt|jd d ƒdS( NRIsutf-8sone stwo RJiÿÿÿÿiiigø?RLi(RRRR%RRRMR5R@(RR2R3((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyttest_readlinesæs$ cCs¡tƒ}t|ddƒ}|jdddgƒ|j|jƒ|j|jƒdƒ|jƒ|j|jƒ|j|jƒdƒ|jt |jdƒdS(NRIsutf-8sone stwo RJi( RRRR+R,R%RRR5R@(RR2R3((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyRGûs  (RRR4R;RNRSRTRG(((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyRH¡s     cCstjttƒdS(N(tsupportt run_unittestR RH(((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyt test_mainst__main__((tunittestR#tidlelib.PyShellRRR<RRUtobjectRR>RR?Rt bytearrayRRtTestCaseR RHRWR(((s1/usr/lib64/python2.7/idlelib/idle_test/test_io.pyts  of