config root man

Current Path : /usr/local/lib/python2.5/test/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/local/lib/python2.5/test/test_csv.pyc

hRc@sddkZddkZddkZddklZddkZddkZddkZddklZdei	fdYZ
dei	fdYZdei	fd	YZd
efdYZ
deifd
YZdefdYZdeifdYZdefdYZdei	fdYZdei	fdYZdei	fdYZdei	fdYZeedoeio	dGHnn-dfdYZd ei	fd!YZd"Zed#joendS($iN(tStringIO(ttest_supporttTest_CsvcBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZRS(s
    Test the underlying C csv parser in ways that are not appropriate
    from the high level interface. Further tests of this nature are done
    in TestDialectRegistry.
    cCse|it||it|d|it||dd|it||dd|it||dd|iti||d|it||dd|it||dd|it||dd|it||dd|it||dd|it||d	d|it||d	tidd
|it||d	tidddS(Ntbad_attrit	delimitertXXtfooit	quotechartlineterminatortquotingt(tassertRaisest	TypeErrortNonetcsvtErrort	QUOTE_ALL(tselftctortarg((s)/usr/local/lib/python2.5/test/test_csv.pyt_test_arg_valids cCs|itigdS(N(RRtreader(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_reader_arg_valid&scCs|ititdS(N(RRtwriterR(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_writer_arg_valid)scGs-||}|i|iid|i|iit|i|iid|i|iid|i|iid|i|ii	t
i|i|iit
|i|iit
|itt|id|itt|idd|itt|id|itt|idddS(Nt,s
t"Rt:R	(tassertEqualtdialectRtdoublequotetTruet
escapecharR
RRR	Rt
QUOTE_MINIMALtskipinitialspacetFalsetstrictRRtdelattrtsetattrtAttributeError(RRtargstobj((s)/usr/local/lib/python2.5/test/test_csv.pyt_test_default_attrs,scCs|itigdS(N(R*RR(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_reader_attrs>scCs|ititdS(N(R*RRR(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_writer_attrsAscGstdddtdddddd	d
tidtdt}|||}|i|iid|i|iit|i|ii	d|i|ii
d|i|iid	|i|iiti|i|ii
t|i|iitdS(
NRRRR s\Rs
Rt*R	R"R$(tdictR#Rt
QUOTE_NONERRRRRR RRR	R"R$(RRR(tkwargsR)((s)/usr/local/lib/python2.5/test/test_csv.pyt_test_kw_attrsDs	cCs|itigdS(N(R1RR(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_reader_kw_attrsTscCs|ititdS(N(R1RRR(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_writer_kw_attrsWscGsdddY}||f}||}|i|iid|i|iit|i|iid|i|iid|i|iid|i|iit	i
|i|iit|i|ii
tdS(NRcBs;eZdZeZdZdZdZei	Z
eZeZ
RS(t-t^t$t#(t__name__t
__module__RR#RR RRRRR	RR"R$(((s)/usr/local/lib/python2.5/test/test_csv.pyR\s	R4R5R6R7((RRRRR#R RRR	RRR"RR$(RRR(RR)((s)/usr/local/lib/python2.5/test/test_csv.pyt_test_dialect_attrsZs	
cCs|itigdS(N(R:RR(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_reader_dialect_attrspscCs|ititdS(N(R:RRR(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_writer_dialect_attrssscKsti\}}ti|d}zPti||}|i||id|i|i	||i
iWd|iti
|XdS(Nsw+bi(ttempfiletmkstemptostfdopenRRtwriterowtseekRtreadRRtclosetunlink(RtfieldstexpectR0tfdtnametfileobjR((s)/usr/local/lib/python2.5/test/test_csv.pyt_write_testws


cCs|iti|idd|idd|idgd|iti|idgddtidd	dY}|it|i|ddd
dY}|it|i|gddS(NR
s""R	tBadListcBseZdZdZRS(cSsdS(Ni
((R((s)/usr/local/lib/python2.5/test/test_csv.pyt__len__scSs|djo
tndS(Ni(tIOError(Rti((s)/usr/local/lib/python2.5/test/test_csv.pyt__getitem__s
(R8R9RMRP(((s)/usr/local/lib/python2.5/test/test_csv.pyRLs	tBadItemcBseZdZRS(cSs
tdS(N(RN(R((s)/usr/local/lib/python2.5/test/test_csv.pyt__str__s(R8R9RR(((s)/usr/local/lib/python2.5/test/test_csv.pyRQs((((RRRRKR
R/RN(RRLRQ((s)/usr/local/lib/python2.5/test/test_csv.pyttest_write_arg_validscCs.dd}|i||gd||fdS(NtXiPs%s,%s(RK(Rt	bigstring((s)/usr/local/lib/python2.5/test/test_csv.pyttest_write_bigfields
cCs|idddgd|iti|idddgddti|idddgddti|idddgddti|idddgddtidS(	Ntaisp,qs	a,1,"p,q"sa,1,p,qR	s"a",1,"p,q"s
"a","1","p,q"(RKRRRR/R!tQUOTE_NONNUMERICR(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_write_quotings


c	Cs
|idddgddd|iti|idddgdddd	t|idddgdddd	t|id
gddddti|id
gd
dddtid	t|id
gd
dddti|idddgddddtidS(NRWisp,qs	a,1,"p,q"R s\sp,"q"s
a,1,"p,\"q\""RRs""""R	s\"sa,1,p\,q(RKRRRR
R#R!R/(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_write_escapes"

cCsdd
dY}ti|}|it|idggti\}}ti|d}zkti|}|it	|id|iddgddgg|id|i|i
d	Wd|iti|XdS(Nt
BrokenFilecBseZdZRS(cSs
tdS(N(RN(Rtbuf((s)/usr/local/lib/python2.5/test/test_csv.pytwrites(R8R9R](((s)/usr/local/lib/python2.5/test/test_csv.pyR[sRWsw+btbtctdis
a,b
c,d
((RRRRNt	writerowsR=R>R?R@RR
RBRRCRDRE(RR[RRHRIRJ((s)/usr/local/lib/python2.5/test/test_csv.pyttest_writerowss

cKs2ti||}t|}|i||dS(N(RRtlistR(RtinputRGR0Rtresult((s)/usr/local/lib/python2.5/test/test_csv.pyt
_read_testscCs|igg|idggg|iti|idgddd|iti|idgddd|idgdggdddS(	NR
s"ab"cR$itabctabcRi(RfRRRR
(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_read_oddinputsscCs|idgddgg|idgddgg|idgddgg|idgddgg|iti|idgg|iti|idgg|iti|id	ggdS(
Nsa,bRWR^sa,b
sa,b
sa,b
sa,b
c,dsa,b
c,dsa,b
c,d(RfRRR(R((s)/usr/local/lib/python2.5/test/test_csv.pyt
test_read_eolscCs|idgdddggdd|idgddggdd|id	gddggdd|id
gddggdd|idgddggdd|id
gddggdddS(Nsa,\b,cRWR^R_R s\sa,b\,csb,csa,"b\,c"sa,"b,\c"s	a,"b,c\""sb,c"sa,"b,c"\sb,c\(Rf(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_read_escapes%""""cCs|idgdddgg|idgdddddggdddd	|idgdddddggd
tidd	|idgdd
dddggd
ti|it|idgggd
tidS(Ns	1,",3,",5t1s,3,t5Rt3RR s\R	s
,3,"5",7.3, 9R
ig333333@i	sabc,3(RfR
RR/RXRt
ValueError(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_read_quotings$
$$
cCsti}zd}d|}d||f}|i|g||ggti||i|g||gg|iti|ti|d|iti|i|gg|ittid|ittiddWdti|XdS(NiPRTs%s,%si(Rtfield_size_limitRfRRRRR
(RtlimittsizeRUtbigline((s)/usr/local/lib/python2.5/test/test_csv.pyttest_read_bigfields

cCsxtidddgtidddgddddgfD]}|i|id|i|i|id	|i|i|id
|i|i|id|it|i|i|idq@WdS(Nsline,1sline,2sline,3t
fieldnamesRWR^R_iiii(RRt
DictReaderRtline_numtnextRt
StopIteration(Rtr((s)/usr/local/lib/python2.5/test/test_csv.pyttest_read_linenums


(R8R9t__doc__RRRR*R+R,R1R2R3R:R;R<RKRSRVRYRZRbRfRiRjRkRpRuR|(((s)/usr/local/lib/python2.5/test/test_csv.pyRs4													
			
				
				
	tTestDialectRegistrycBsGeZdZdZdZdZdZdZdZRS(cCs=|ittid|itti|ititid|ititid|itti|ititid|ititid|ittid|ittidd|ittiddd|ittiddd|ittiddd|ittigdS(NtnonesuchitbadargumentR	(	RRRt
list_dialectsR
tget_dialectRtunregister_dialecttregister_dialect(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_registry_badargsscCsdtifdY}d}ti|g}|iti||zF|iti|idti}|i|i||Wdti	|XdS(Nt
myexceltsvcBseZdZRS(s	(R8R9R(((s)/usr/local/lib/python2.5/test/test_csv.pyR0ss	(
RtexcelRtsortRt
failUnlessRRRR(RRRItexpected_dialectstgot_dialects((s)/usr/local/lib/python2.5/test/test_csv.pyt
test_registry/s

cCsyd}ti|ddzK|iti|id|ittid|dddgWdti|XdS(	NtfedcbaRt;s	sX;Y;ZRTtYtZ(RRRRRRcRR(RRI((s)/usr/local/lib/python2.5/test/test_csv.pyttest_register_kwargs>s/cCs0dtifdY}|iti|dS(NRcBseZdZRS(s	(R8R9R(((s)/usr/local/lib/python2.5/test/test_csv.pyRHs(RtDialectRR(RR((s)/usr/local/lib/python2.5/test/test_csv.pyttest_incomplete_dialectGscCsdtifdY}ti\}}ti|d}zn|id|idti|d|}|i	|i
ddg|i	|i
d	d
gWd|iti|XdS(NtspacecBseZdZeiZdZRS(t s\(R8R9RRR/R	R (((s)/usr/local/lib/python2.5/test/test_csv.pyRMs	sw+bsabc def
c1ccccc1 benzene
iRRhtdeftc1ccccc1tbenzene(
RRR=R>R?R@R]RBRRRyRDRE(RRRHRIRJtrdr((s)/usr/local/lib/python2.5/test/test_csv.pyttest_space_dialectLs

 
cCsIdtifdY}dtifdY}dtifdY}tid|zti\}}ti|d}zLti|}|idd	d
g|i	d|i
|idWd|iti
|Xti\}}ti|d}zOti||}|idd	d
g|i	d|i
|id
Wd|iti
|Xti\}}ti|d}zUti|d|}|idd	d
g|i	d|i
|idWd|iti
|Xti\}}ti|d}zRti|dd}|idd	d
g|i	d|i
|idWd|iti
|Xti\}}ti|d}zXti|d|dd}|idd	d
g|i	d|i
|idWd|iti
|XWdtidXdS(NttestAcBseZdZRS(s	(R8R9R(((s)/usr/local/lib/python2.5/test/test_csv.pyR_sttestBcBseZdZRS(R(R8R9R(((s)/usr/local/lib/python2.5/test/test_csv.pyRasttestCcBseZdZRS(t|(R8R9R(((s)/usr/local/lib/python2.5/test/test_csv.pyRcssw+biiiis1,2,3
s1	2	3
Rs1:2:3
s1|2|3
RRs1;2;3
(RRRR=R>R?R@RRARBRRCRDRER(RRRRRHRIRJR((s)/usr/local/lib/python2.5/test/test_csv.pyttest_dialect_apply^sf









cCst|ittigdd|ittigdd|ittigdd|ittigdddS(NRiRR	iid(RRRRR
(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_bad_dialects(	R8R9RRRRRRR(((s)/usr/local/lib/python2.5/test/test_csv.pyR~s							DtTestCsvBasecBseZdZdZRS(cCsti\}}ti|d}zR|i||idti|d|i}t	|}|i
||Wd|iti|XdS(Nsw+biR(
R=R>R?R@R]RBRRRRcRRDRE(RRdtexpected_resultRHRIRJRRF((s)/usr/local/lib/python2.5/test/test_csv.pytreaderAssertEquals


cCsti\}}ti|d}zLti|d|i}|i||id|i	|i
|Wd|iti|XdS(Nsw+bRi(
R=R>R?R@RRRRaRBRRCRDRE(RRdRRHRIRJR((s)/usr/local/lib/python2.5/test/test_csv.pytwriterAssertEquals


(R8R9RR(((s)/usr/local/lib/python2.5/test/test_csv.pyRs	
tTestDialectExcelcBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZRS(RcCs|iddggdS(NRh(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_singlescCs&|iddddddggdS(Ns	1,2,3,4,5Rlt2Rnt4Rm(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_simplescCs|idgdS(NR
(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_blanklinescCs|idddggdS(NRR
(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_empty_fieldsscCs|iddggdS(Ns""R
(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_singlequotedscCs|idddggdS(Ns"",R
(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_singlequoted_left_emptyscCs|idddggdS(Ns,""R
(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_singlequoted_right_emptyscCs|iddggdS(Ns""""R(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_single_quoted_quotescCs|iddggdS(Ns""""""s""(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_quoted_quotesscCs|iddggdS(Nsa""b(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_inline_quotescCs|iddggdS(Nsa"b"c(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_inline_quotesscCs|iddggdS(Ns"a"btab(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_quotes_and_morescCs|iddggdS(Nsa"b(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_lone_quotescCs|iddggdS(Ns"a" "b"sa "b"(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_quote_and_quotescCs|iddggdS(Ns "a"(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_space_and_quotescCs)|idddddddggdS(Ns#1,2,3,"I think, therefore I am",5,6RlRRnsI think, therefore I amRmt6(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_quoteds		cCs&|iddddddggdS(NsJ1,2,3,"""I see,"" said the blind man","as he picked up his hammer and saw"RlRRns"I see," said the blind mans"as he picked up his hammer and saw(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_quoted_quotes		cCs;d}|i|dddddgddd	d
ggdS(NsR1,2,3,"""I see,""
said the blind man","as he picked up his
hammer and saw"
9,8,7,6RlRRns"I see,"
said the blind mans"as he picked up his
hammer and sawt9t8t7R(R(RRd((s)/usr/local/lib/python2.5/test/test_csv.pyttest_quoted_nls		cCs#|idddddggdS(Ns	12,12,1",t12s1"R
(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_dubious_quotescCs|igddS(NR
(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyt	test_nullscCs|idggddS(NRhsabc
(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyRscCs&|idddddggddS(NiiRhiis
1,2,abc,3,4
(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyRscCs&|idddddggddS(Niisa"bc"iis1,2,"a""bc""",3,4
(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_quotesscCs|idggddS(Nsabc,defs"abc,def"
(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_quote_fieldsepscCs&|idddddggddS(Niisa
bciis1,2,"a
bc",3,4
(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyt
test_newliness(R8R9RRRRRRRRRRRRRRRRRRRRRRRR(((s)/usr/local/lib/python2.5/test/test_csv.pyRs4																								tEscapedExcelcBseZeiZdZRS(s\(R8R9RR/R	R (((s)/usr/local/lib/python2.5/test/test_csv.pyR!s	tTestEscapedExcelcBs#eZeZdZdZRS(cCs|idggddS(Nsabc,defs
abc\,def
(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_escape_fieldsep(scCs|iddggdS(Ns
abc\,def
sabc,def(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_read_escape_fieldsep+s(R8R9RRRR(((s)/usr/local/lib/python2.5/test/test_csv.pyR%s		tQuotedEscapedExcelcBseZeiZdZRS(s\(R8R9RRXR	R (((s)/usr/local/lib/python2.5/test/test_csv.pyR.s	tTestQuotedEscapedExcelcBs#eZeZdZdZRS(cCs|idggddS(Nsabc,defs"abc,def"
(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyttest_write_escape_fieldsep5scCs|iddggdS(Ns"abc\,def"
sabc,def(R(R((s)/usr/local/lib/python2.5/test/test_csv.pyR8s(R8R9RRRR(((s)/usr/local/lib/python2.5/test/test_csv.pyR2s		tTestDictFieldscBskeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZRS(c	Csti\}}ti|d}zdti|ddddg}|ihdd<dd<|id|i|i	d	Wd|i
ti|XdS(
Nsw+bRvtf1tf2tf3i
Rhis	10,,abc
(R=R>R?R@Rt
DictWriterRARBRRCRDRE(RRHRIRJR((s)/usr/local/lib/python2.5/test/test_csv.pyttest_write_simple_dict>s

cCs#t}|itti|dS(N(RRRRR(RRJ((s)/usr/local/lib/python2.5/test/test_csv.pyttest_write_no_fieldsJs	c	Csti\}}ti|d}zm|id|idti|ddddg}|i|i	hdd<d	d<d
d<Wd|i
ti|XdS(Nsw+bs	1,2,abc
iRvRRRRlRRh(R=R>R?R@R]RBRRwRRyRDRE(RRHRIRJR((s)/usr/local/lib/python2.5/test/test_csv.pyttest_read_dict_fieldsNs

5
c	Csti\}}ti|d}z^|id|idti|}|i|i	hdd<dd<dd	<Wd|i
ti|XdS(
Nsw+bsf1,f2,f3
1,2,abc
iRlRRRRhR(R=R>R?R@R]RBRRwRRyRDRE(RRHRIRJR((s)/usr/local/lib/python2.5/test/test_csv.pyttest_read_dict_no_fieldnames[s

5
cCsti\}}ti|d}zv|id|idti|dddg}|i|i	hdd<dd<d	d
ddgd<Wd|iti|XdS(
Nsw+bs1,2,abc,4,5,6
iRvRRRlRRhRRmR(
R=R>R?R@R]RBRRwRRyR
RDRE(RRHRIRJR((s)/usr/local/lib/python2.5/test/test_csv.pyttest_read_longgs

%
cCsti\}}ti|d}z||id|idti|dddgdd}|i|i	hd	d<d
d<ddd
dgd<Wd|i
ti|XdS(Nsw+bs1,2,abc,4,5,6
iRvRRtrestkeyt_restRlRRhRRmR(R=R>R?R@R]RBRRwRRyRDRE(RRHRIRJR((s)/usr/local/lib/python2.5/test/test_csv.pyttest_read_long_with_restus

%
cCsti\}}ti|d}zp|id|idti|dd}|i|i	hdd<dd	<d
ddd
gd<Wd|i
ti|XdS(Nsw+bsf1,f2
1,2,abc,4,5,6
iRRRlRRRRhRRmR(R=R>R?R@R]RBRRwRRyRDRE(RRHRIRJR((s)/usr/local/lib/python2.5/test/test_csv.pyt&test_read_long_with_rest_no_fieldnamess

%
c	Csti\}}ti|d}z|id|idti|ddidd}|i	|i
hdd<d	d	<d
d<dd<d
d
<dd<|i	|i
hdd<d	d	<d
d<dd<dd
<dd<Wd|iti|XdS(Nsw+bs1,2,abc,4,5,6
1,2,abc
iRvs1 2 3 4 5 6trestvaltDEFAULTRlRRhRnRRmR(
R=R>R?R@R]RBRRwtsplitRRyRDRE(RRHRIRJR((s)/usr/local/lib/python2.5/test/test_csv.pyttest_read_shorts

	..
cCsqdddg}ti|ddi}|i|ihdd<dd	<d
d<dd
<dd<dS(Ns2147483648,43.0e12,17,abc,def
s147483648,43.0e2,17,abc,def
s47483648,43.0,170,abc,def
Rvsi1 float i2 s1 s2t
2147483648ti1s43.0e12tfloatt17ti2Rhts1Rts2(RRwRRRy(RtsampleR((s)/usr/local/lib/python2.5/test/test_csv.pyttest_read_multis				cCstidddgddi}|i|ihdd<dd<dd<d	d	<d
d
<dd<|i|ihdd<dd<dd<d	d	<d
d
<dd<dS(Ns1,2,abc,4,5,6
s
Rvs1 2 3 4 5 6RlRRhRnRRmR(RRwRRRy(RR((s)/usr/local/lib/python2.5/test/test_csv.pyttest_read_with_blankss	..cCsttidgddidd}|i|ihdd<dd<dd	<d
d
<dd<dd<dS(
Ns1;2;abc;4;5;6
Rvs1 2 3 4 5 6RRRlRRhRnRRmR(RRwRRRy(RR((s)/usr/local/lib/python2.5/test/test_csv.pyttest_read_semi_seps
	.(
R8R9RRRRRRRRRRR(((s)/usr/local/lib/python2.5/test/test_csv.pyR;s			
				
				tTestArrayWritescBs,eZdZdZdZdZRS(cCs	ddk}g}tdD]}|d|q~}|id|}ti\}}ti|d}z}ti|dd}	|	i|di	g}
|D]}|
t
|q~
d}|id	|i|i
|Wd|iti|XdS(
NiiROsw+bRRRs
i(tarraytrangeR=R>R?R@RRRAtjointstrRBRRCRDRE(RRt_[1]ROtcontentsRWRHRIRJRt_[2]texpected((s)/usr/local/lib/python2.5/test/test_csv.pyttest_int_writes+
4

cCs
ddk}g}tdD]}|d|dq~}|id|}ti\}}ti|d}z}ti|dd}	|	i|di	g}
|D]}|
t
|q~
d	}|id
|i|i
|Wd|iti|XdS(Niig?R`sw+bRRRs
i(RRR=R>R?R@RRRARRRBRRCRDRE(RRRRORRWRHRIRJRRR((s)/usr/local/lib/python2.5/test/test_csv.pyttest_double_writes/
4

cCs
ddk}g}tdD]}|d|dq~}|id|}ti\}}ti|d}z}ti|dd}	|	i|di	g}
|D]}|
t
|q~
d	}|id
|i|i
|Wd|iti|XdS(Niig?tfsw+bRRRs
i(RRR=R>R?R@RRRARRRBRRCRDRE(RRRRORRWRHRIRJRRR((s)/usr/local/lib/python2.5/test/test_csv.pyttest_float_writes/
4

c		Csddk}ddk}|id|i}ti\}}ti|d}z\ti|dd}|i	|di
|d}|id|i|i
|Wd|iti|XdS(	NiR_sw+bRRRs
i(RtstringtlettersR=R>R?R@RRRARRBRRCRDRE(	RRRRWRHRIRJRR((s)/usr/local/lib/python2.5/test/test_csv.pyttest_char_writes


(R8R9RRRR(((s)/usr/local/lib/python2.5/test/test_csv.pyRs			tTestDialectValiditycBs#eZdZdZdZRS(cCsdtifdY}|}d|_|iti|t|_ti|_d|_	|}d|_	|iti|d|_	|iti|dS(Nt	mydialectcBs/eZdZdZeZeZdZe	i
ZRS(Rs\s
(R8R9RR R#RRR"RRR/R	(((s)/usr/local/lib/python2.5/test/test_csv.pyRsRs''i(
RRR
R	RRRRRR(RRR`((s)/usr/local/lib/python2.5/test/test_csv.pyttest_quotings							cCs^dtifdY}|}d|_|iti|d|_|iti|dS(NRcBs/eZdZdZeZeZdZe	i
ZRS(Rs\s
(R8R9RR R#RRR"RRR/R	(((s)/usr/local/lib/python2.5/test/test_csv.pyRss:::i(RRRRR(RRR`((s)/usr/local/lib/python2.5/test/test_csv.pyttest_delimiters			cCsTdtifdY}|}d|_|}d|_|iti|dS(NRcBs/eZdZdZeZeZdZe	i
ZRS(Rs\s
(R8R9RR R#RRR"RRR/R	(((s)/usr/local/lib/python2.5/test/test_csv.pyR,ss:::i(RRRRR(RRR`((s)/usr/local/lib/python2.5/test/test_csv.pyttest_lineterminator+s				(R8R9RRR(((s)/usr/local/lib/python2.5/test/test_csv.pyRs		tTestSniffercBsSeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZRS(sHarry's, Arlington Heights, IL, 2/1/03, Kimi Hayes
Shark City, Glendale Heights, IL, 12/28/02, Prezence
Tommy's Place, Blue Island, IL, 12/28/02, Blue Sunday/White Crow
Stonecutters Seafood and Chop House, Lemont, IL, 12/19/02, Week Back
s'Harry''s':'Arlington Heights':'IL':'2/1/03':'Kimi Hayes'
'Shark City':'Glendale Heights':'IL':'12/28/02':'Prezence'
'Tommy''s Place':'Blue Island':'IL':'12/28/02':'Blue Sunday/White Crow'
'Stonecutters Seafood and Chop House':'Lemont':'IL':'12/19/02':'Week Back'
s+"venue","city","state","date","performers"
s05/05/03?05/05/03?05/05/03?05/05/03?05/05/03?05/05/03
05/05/03?05/05/03?05/05/03?05/05/03?05/05/03?05/05/03
05/05/03?05/05/03?05/05/03?05/05/03?05/05/03?05/05/03
sT2147483648;43.0e12;17;abc;def
147483648;43.0e2;17;abc;def
47483648;43.0;170;abc;def
saaa	bbb
AAA	
BBB	
sa|b|c
d|e|f
s'a'|'b'|'c'
'd'|e|f
cCsOti}|i|i|it|i|i|i|itdS(N(RtSnifferRt
has_headertsample1R#theaderR(Rtsniffer((s)/usr/local/lib/python2.5/test/test_csv.pyttest_has_header\scCsti}|i|i}|i|id|i|id|i|it|i|i	}|i|id|i|id|i|it
dS(NRRRt'(RRtsniffRRRRR"Rtsample2R#(RRR((s)/usr/local/lib/python2.5/test/test_csv.pyt
test_sniffascCs8ti}|i|i}|i|i|ij|i|idd}|i|id|i|idd}|i|id|i|i}|i|id|i|i}|i|id|i|i	}|i|id|i|i
}|i|id|i|id	dS(
Nt
delimiterss?,t?s/,t/Rs	RR(RRRtsample3tassert_RRtsample4tsample5tsample6tsample7R(RRR((s)/usr/local/lib/python2.5/test/test_csv.pyttest_delimitersms (
R8R9RRRRRRRRRRR(((s)/usr/local/lib/python2.5/test/test_csv.pyR<s		tgettotalrefcounts*** skipping leakage tests ***tNULcBseZdZeZRS(cGsdS(N((tsR(((s)/usr/local/lib/python2.5/test/test_csv.pyR]s(R8R9R]t
writelines(((s)/usr/local/lib/python2.5/test/test_csv.pyRs	t	TestLeakscBs,eZdZdZdZdZRS(cCsd}ti}x}tdD]o}ti|itigti}tidgtidgtidg||}|}qW|i|djt	dS(Niisa,b,c
i(
tsysRtxrangetgctcollectRtgarbageRRR(RtdeltatlastrcROtrc((s)/usr/local/lib/python2.5/test/test_csv.pyttest_create_reads



cCsd}ti}t}xttdD]f}ti|itigti}ti	|ti	|ti	|||}|}q(W|i|djt
dS(Niii(RRRRRRRRRRR(RRRRROR((s)/usr/local/lib/python2.5/test/test_csv.pyttest_create_writes	






cCsd}dgd}ti}xmtdD]_}ti|itigti}ti|}x|D]}qqW||}|}q,W|i|djt	dS(Nisa,b,c
ii(
RRRRRRRRRR(RRtrowsRRORRtrow((s)/usr/local/lib/python2.5/test/test_csv.pyt	test_reads




c	Csd}dddggd}t}ti}xztdD]l}ti|itigti}ti	|}x|D]}|i
|qW||}|}q>W|i|djtdS(Niiiiii(RRRRRRRRRRRAR(	RRR"RRRORRR#((s)/usr/local/lib/python2.5/test/test_csv.pyt
test_writes 	



(R8R9R R!R$R%(((s)/usr/local/lib/python2.5/test/test_csv.pyRs			cCs\tit}tig}t|D]*}|ido|t||q$q$~dS(NtTest(RtmodulesR8Rtrun_unittesttdirt
startswithtgetattr(tmodRRI((s)/usr/local/lib/python2.5/test/test_csv.pyt	test_mains
t__main__(RR?tunittestRR=RRttestRtTestCaseRR~RRRRRRRRRRRthasattrtverboseRRR-R8(((s)/usr/local/lib/python2.5/test/test_csv.pys<module>s8]		A:F

P	


Man Man