config root man

Current Path : /compat/linux/proc/self/root/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 : //compat/linux/proc/self/root/usr/local/lib/python2.5/test/test_repr.pyo

³ò
h”Rc
@sdZddkZddkZddkZddkZddklZddklZddkl	Z	d„Z
deifd„ƒYZd	d
„Z
d„Zdeifd
„ƒYZddd„ƒYZddd„ƒYZd„ZedjoeƒndS(s3
  Test cases for the repr module
  Nick Mathewson
iÿÿÿÿN(trun_unittest(trepr(tReprcCs*d}xt|ƒD]}|f}qW|S(N((trange(tnestingttti((s*/usr/local/lib/python2.5/test/test_repr.pytnestedTuples


t	ReprTestscBs†eZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„Zd
„ZRS(cCsÚ|i}|tdƒdƒ|tdƒdƒdddd}t|ƒd d	t|ƒd
}|t|ƒ|ƒ|tdƒtdƒƒddd
d}t|ƒd d	t|ƒd
}|t|ƒ|ƒdS(Ntabcs'abc'tabcdefghijklmnops'abcdefghijklmnop'taitbi
s...iòÿÿÿs"'s"t'id(tassertEqualstrR(tselfteqtstexpected((s*/usr/local/lib/python2.5/test/test_repr.pyttest_strings	""cCsu|i}|tdƒdƒd	}|t|ƒdƒtƒ}d|_t|ƒd d}||i|ƒ|ƒdS(
Nis(1,)iis	(1, 2, 3)iþÿÿÿs...)(i(iii(RRRtmaxtupleR(RRtt3tr2R((s*/usr/local/lib/python2.5/test/test_repr.pyt
test_tuple&s			cCsddkl}ddkl}|i}|td0ƒdƒ|td1ƒdƒ|td2ƒd	ƒ|td3ƒd
ƒ|td4ƒdƒ|tgƒdƒ|tdgƒdƒ|tdddgƒdƒ|tdddd
ddgƒdƒ|tdddd
dddgƒdƒ|ttgƒƒdƒ|ttdgƒƒdƒ|ttdddgƒƒdƒ|ttdddd
ddgƒƒdƒ|ttdddd
dddgƒƒdƒ|ttgƒƒdƒ|ttdgƒƒdƒ|ttdddgƒƒdƒ|ttdddd
ddgƒƒdƒ|ttdddd
dddgƒƒdƒ|t|dddd
dddgƒƒdƒ|thƒd ƒhdd!<dd"<dd#<d
d$<}|t|ƒd%ƒd|d&<|t|ƒd'ƒ|t|d(ƒƒd)ƒ|t|d(dgƒƒd*ƒ|t|d(ddgƒƒd+ƒ|t|d(dddgƒƒd,ƒ|t|d(dddd
gƒƒd-ƒ|t|d(dddd
dgƒƒd.ƒ|t|d(dddd
ddgƒƒd/ƒdS(5Niÿÿÿÿ(tarray(tdeques()is(1,)iis	(1, 2, 3)iiis(1, 2, 3, 4, 5, 6)is(1, 2, 3, 4, 5, 6, ...)s[]s[1]s	[1, 2, 3]s[1, 2, 3, 4, 5, 6]s[1, 2, 3, 4, 5, 6, ...]sset([])sset([1])sset([1, 2, 3])sset([1, 2, 3, 4, 5, 6])sset([1, 2, 3, 4, 5, 6, ...])s
frozenset([])sfrozenset([1])sfrozenset([1, 2, 3])sfrozenset([1, 2, 3, 4, 5, 6])s"frozenset([1, 2, 3, 4, 5, 6, ...])sdeque([1, 2, 3, 4, 5, 6, ...])s{}talicetbobtcharlestdaves/{'alice': 1, 'bob': 2, 'charles': 3, 'dave': 4}tarthurs6{'alice': 1, 'arthur': 1, 'bob': 2, 'charles': 3, ...}Rsarray('i', [])sarray('i', [1])sarray('i', [1, 2])sarray('i', [1, 2, 3])sarray('i', [1, 2, 3, 4])sarray('i', [1, 2, 3, 4, 5])s array('i', [1, 2, 3, 4, 5, ...])((i(iii(iiiiii(iiiiiii(RtcollectionsRRRtsett	frozenset(RRRRtd((s*/usr/local/lib/python2.5/test/test_repr.pyttest_container2sJ	%("+."+..*
"%(+'cCs›|i}|tdƒtdƒƒ|tdƒtdƒƒ|tddƒtddƒƒd
}t|ƒd dt|ƒd	}|t|ƒ|ƒdS(Ni{l{gð?il
idis...iíÿÿÿlDG¨†dªrÓâÈYâ|gÄO¬s&YR5I(RRR(RRtnR((s*/usr/local/lib/python2.5/test/test_repr.pyttest_numbersgs	!"cCsñ|i}tdƒ}|t|ƒt|ƒƒtddƒ}t|ƒd dt|ƒd}|t|ƒ|ƒtƒ}|t|ƒdt|ƒƒttƒ}|i|idƒƒ|i|id	ƒƒ|i|i	dƒd
jƒdS(NRtxièi
s...iòÿÿÿs%<ClassWithFailingRepr instance at %x>s<class t>i(
Rt
ClassWithReprRRtClassWithFailingReprtidt
failUnlesst
startswithtendswithtfind(RRti1ti2Rti3R((s*/usr/local/lib/python2.5/test/test_repr.pyt
test_instanceqs	"	cCscttiƒ}|it|ƒidtiƒƒ|iƒ|it|ƒidtiƒƒdS(Ns<open file '%s', mode 'r' at 0xs!<closed file '%s', mode 'r' at 0x(topentunittestt__file__R,RR-tclose(Rtfp((s*/usr/local/lib/python2.5/test/test_repr.pyt	test_file‚s
cCs#|itd„ƒidƒƒdS(NcSs|S(((R'((s*/usr/local/lib/python2.5/test/test_repr.pyt<lambda>‹ss<function <lambda(R,RR-(R((s*/usr/local/lib/python2.5/test/test_repr.pyttest_lambdaŠscCs?|i}|ttƒdƒ|itdiƒidƒƒdS(Ns<built-in function hash>ts*<built-in method split of str object at 0x(RRthashR,tsplitR-(RR((s*/usr/local/lib/python2.5/test/test_repr.pyttest_builtin_functions	cCsmddk}|i}|ttdƒƒdƒ|ttddƒƒdƒ|ttdddƒƒdƒdS(Niÿÿÿÿis	xrange(1)isxrange(1, 2)isxrange(1, 4, 3)(twarningsRRtxrange(RR@R((s*/usr/local/lib/python2.5/test/test_repr.pyttest_xrange—s
	cCs)|i}|tgggggggƒdƒ|tggggggggƒdƒ|ttdƒƒdƒ|ttdƒƒdƒ|thtdƒtdƒ<ƒdƒ|thtdƒtdƒ<ƒd	ƒ|thggggggƒd
ƒ|thgggggggƒdƒdS(Ns[[[[[[[]]]]]]]s[[[[[[[...]]]]]]]is(((((((),),),),),),)is(((((((...),),),),),),)is&{((((((),),),),),): ((((((),),),),),)}s,{((((((...),),),),),): ((((((...),),),),),)}s[[[[[[{}]]]]]](RRR(RR((s*/usr/local/lib/python2.5/test/test_repr.pyttest_nestingžs	%(!!%cCs,tdƒ}|it|ƒidƒƒdS(Ntfoos<read-only buffer for 0x(tbufferR,RR-(RR'((s*/usr/local/lib/python2.5/test/test_repr.pyttest_buffer¯scCsdS(N((R((s*/usr/local/lib/python2.5/test/test_repr.pyt	test_cellµscCsŒ|i}|ttiƒdƒddd„ƒY}t|iƒ}|it|ƒidƒƒt|iƒ}|it|ƒidƒƒdS(Ns"<method 'items' of 'dict' objects>tCcBseZd„ZRS(cSsdS(N((tcls((s*/usr/local/lib/python2.5/test/test_repr.pyRDÂs(t__name__t
__module__RD(((s*/usr/local/lib/python2.5/test/test_repr.pyRHÁss<staticmethod object at 0xs<classmethod object at 0x((	RRtdicttitemststaticmethodRDR,R-tclassmethod(RRRHR'((s*/usr/local/lib/python2.5/test/test_repr.pyttest_descriptors¹s	cCs[tdddgƒ}t|ƒ}hdd<dd<}t|ƒt|ƒt|ƒdS(Nyð?y@y@ii(R!R"R(RR'tytz((s*/usr/local/lib/python2.5/test/test_repr.pyttest_unsortableÈs

(RJRKRRR$R&R3R9R;R?RBRCRFRGRPRS(((s*/usr/local/lib/python2.5/test/test_repr.pyRs			5	
									R<cCs*t|dƒ}|i|ƒ|iƒdS(Ntw(R4twriteR7(tpathttextR8((s*/usr/local/lib/python2.5/test/test_repr.pyttouchÒs
cCs1x*|D]"}|itii||ƒƒqWdS(N(tappendtosRVtjoin(tactionstdirnametnamestname((s*/usr/local/lib/python2.5/test/test_repr.pytzap×stLongReprTestcBsYeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
RS(	cCsöd}tii|ƒ|_tii||ƒ|_ti|idtƒti|iƒt	tii|idti
dƒƒti|idtƒti|iƒt	tii|idti
dƒƒtiƒ|_t
iid|iƒdS(Nt3areallylongpackageandmodulenametotestreprtruncationt
ignore_errorst__init__tpyi(RZRVR[tpkgnamet
subpkgnametshutiltrmtreetTruetmkdirRXtextseptgetcwdtheretsystinsert(Rtlongname((s*/usr/local/lib/python2.5/test/test_repr.pytsetUpÜs''cCs“g}tii|it|ƒ|i|iƒ|iƒ|iƒx?|D]7}tii|ƒoti	|ƒqJti
|ƒqJWtid=dS(Ni(RZRVtwalkRfR`RYtsorttreversetisdirtrmdirtremoveRo(RR\tp((s*/usr/local/lib/python2.5/test/test_repr.pyttearDownës

cCs}|i}ttii|i|itidƒƒddkl	}|t
|ƒd|i|ifƒ|t
t
ƒdƒdS(NReiÿÿÿÿ(Rbs<module '%s' from '%s'>s<module 'sys' (built-in)>(RRXRZRVR[RgRfRltgareallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncationRbRRJR6Ro(RRRb((s*/usr/local/lib/python2.5/test/test_repr.pyttest_moduleøs	*cCsd|i}ttii|idtidƒdƒddkl}|t	|iƒd|i
ƒdS(NRDResclass foo(object):
    pass
iÿÿÿÿ(RDs<class '%s.foo'>(RRXRZRVR[RgRlR{RDRRJ(RRRD((s*/usr/local/lib/python2.5/test/test_repr.pyt	test_types	#cCsdS(N((R((s*/usr/local/lib/python2.5/test/test_repr.pyttest_object
scCsdttii|idtidƒdƒddkl}|it	|iƒi
d|iƒƒdS(NtbarResclass bar:
    pass
iÿÿÿÿ(Rs<class %s.bar at 0x(RXRZRVR[RgRlR{RR,RR-RJ(RR((s*/usr/local/lib/python2.5/test/test_repr.pyt
test_classs
#cCsmttii|idtidƒdƒddkl}|iƒ}|it	|ƒi
d|iƒƒdS(NtbazResclass baz:
    pass
iÿÿÿÿ(Rs<%s.baz instance at 0x(RXRZRVR[RgRlR{RR,RR-RJ(RRtibaz((s*/usr/local/lib/python2.5/test/test_repr.pyR3s#cCs•|i}ttii|idtidƒdƒddkl}|t	|i
iƒdƒ|i
ƒ}|it	|iƒi
d|ifƒƒdS(NtquxResìclass aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaatamethodR,R-RJ(RRRƒtiqux((s*/usr/local/lib/python2.5/test/test_repr.pyttest_method#s	#cCsdS(N((R((s*/usr/local/lib/python2.5/test/test_repr.pyR?3s(RJRKRrRzR|R}R~R€R3R‡R?(((s*/usr/local/lib/python2.5/test/test_repr.pyRaÛs		
		
		
	
	R)cBseZd„Zd„ZRS(cCs
||_dS(N(R(RR((s*/usr/local/lib/python2.5/test/test_repr.pyRd8scCsd|iS(NsClassWithLongRepr(%r)(R(R((s*/usr/local/lib/python2.5/test/test_repr.pyt__repr__:s(RJRKRdRˆ(((s*/usr/local/lib/python2.5/test/test_repr.pyR)7s	R*cBseZd„ZRS(cCstdƒ‚dS(Ns+This should be caught by Repr.repr_instance(t	Exception(R((s*/usr/local/lib/python2.5/test/test_repr.pyRˆ?s(RJRKRˆ(((s*/usr/local/lib/python2.5/test/test_repr.pyR*>scCs,ttƒtidjottƒndS(Ntmac(RRRZR_Ra(((s*/usr/local/lib/python2.5/test/test_repr.pyt	test_mainCs
t__main__(((t__doc__RoRZRhR5ttest.test_supportRRRRRtTestCaseRRXR`RaR)R*R‹RJ(((s*/usr/local/lib/python2.5/test/test_repr.pys<module>s"	¼	\	


Man Man