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_bisect.pyo

³ò
h”Rc@s!ddkZddklZddklZlZlZlZlZlZddk	l	Z	dei
fd„ƒYZdei
fd„ƒYZd	dd
„ƒYZ
ddd„ƒYZd
dd„ƒYZdei
fd„ƒYZdZhed<Zdd„ZedjoedeƒndS(iÿÿÿÿN(ttest_support(tbisect_righttbisect_lefttinsort_lefttinsort_righttinsorttbisect(tUserListt
TestBisectcXBsÒeZegddfedgddfedgddfedgddfeddgddfeddgddfeddgddfedddgddfedddgddfedddgddfeddddgddfeddddgddfeddddgddfeddgddfeddgddfeddgddfeddgddfeddgddfeddddgddfeddddgddfeddddgddfeddddgddfeddddgddfedddgddfedddgddfedddgddfedddgddfedddgddfedddgddfedddgddfeddddddddddg
ddfeddddddddddg
ddfeddddddddddg
ddfeddddddddddg
ddfeddddddddddg
ddfeddddddddddg
ddfeddddddddddg
ddfeddddddddddg
dd	feddddddddddg
d
d	fegddfedgddfedgddfedgddfeddgddfeddgddfeddgddfedddgddfedddgddfedddgddfeddddgddfeddddgddfeddddgddfeddgddfeddgddfeddgddfeddgddfeddgddfeddddgddfeddddgddfeddddgddfeddddgddfeddddgddfedddgddfedddgddfedddgddfedddgddfedddgddfedddgddfedddgddfeddddddddddg
ddfeddddddddddg
ddfeddddddddddg
ddfeddddddddddg
ddfeddddddddddg
ddfeddddddddddg
ddfeddddddddddg
ddfeddddddddddg
ddfeddddddddddg
d
d	fgNZd„Zdd
„Zd„Zd„Zd„Z	RS(iiiiigø?g@ig@i
icCs\xU|iD]J\}}}}|i|||ƒ|ƒ|i|t|ƒ|ƒ|ƒq
WdS(N(tprecomputedCasestassertEqualR(tselftfunctdatatelemtexpected((s,/usr/local/lib/python2.5/test/test_bisect.pyttest_precomputedZs
ic		CsMddkl}x6t|ƒD](}g}t|ƒD]}||d|dƒq4~}|iƒ|d|dƒ}t||ƒ}|t|ƒjo|i|||jƒn|djo|i||d|jƒnt||ƒ}|t|ƒjo|i|||jƒn|djo|i||d|jƒqqWdS(Niÿÿÿÿ(t	randrangeiii(trandomRtxrangetsortRtlent
failUnlessR(	RtnRtit_[1]tjR
Rtip((s,/usr/local/lib/python2.5/test/test_bisect.pyttest_random_s 
3


c
Cs¶x¯|iD]¤\}}}}xtdƒD]}tt|ƒ|ƒ}xctddƒD]R}tt|ƒ|ƒ}|||||ƒ}|i||jo
|jnƒ|tjo(||jo|i|||jƒn|tjo,||jo|i||d|jƒn|tjo(||jo|i|||jƒn|tjo,||jo|i||d|jƒn|i|t|t||ƒƒƒqTWq)Wq
WdS(Niiii(	R	RtminRRRRR
tmax(RRR
RRtlothiR((s,/usr/local/lib/python2.5/test/test_bisect.pyttest_optionalSlicingps&

$cCs|ittƒdS(N(R
RR(R((s,/usr/local/lib/python2.5/test/test_bisect.pyttest_backcompatibility‚sc
Csdddddg}|itd|ddd	d
ddƒd
ƒ|itd|ddd	d
ddƒd
ƒ|itd|ddd	d
ddƒd
ƒtd|ddd	d
ddƒtd|ddd	d
ddƒtd|ddd	d
ddƒ|i|ddddddddgƒdS(Ni
iii(i2tatxiRiR ii(R
RRRRRR(RR
((s,/usr/local/lib/python2.5/test/test_bisect.pyttest_keyword_args…s+++(
t__name__t
__module__RRR	RRR!R"R%(((s,/usr/local/lib/python2.5/test/test_bisect.pyRs¦-----------------3			t
TestInsortcBseZdd„Zd„ZRS(iôcCs”ddkl}xgtƒtƒfD]S}xJt|ƒD]<}|dƒ}|djo
t}nt}|||ƒq6Wq#W|it|ƒ|ƒdS(Niÿÿÿÿ(tchoicet
0123456789t02468(	RR)tlistRRRRR
tsorted(RRR)tinsortedRtdigittf((s,/usr/local/lib/python2.5/test/test_bisect.pyttest_vsBuiltinSort“s


cCs|ittƒdS(N(R
RR(R((s,/usr/local/lib/python2.5/test/test_bisect.pyR"Ÿs(R&R'R1R"(((s,/usr/local/lib/python2.5/test/test_bisect.pyR(‘stLenOnlycBseZdZd„ZRS(s:Dummy sequence class defining __len__ but not __getitem__.cCsdS(Ni
((R((s,/usr/local/lib/python2.5/test/test_bisect.pyt__len__§s(R&R't__doc__R3(((s,/usr/local/lib/python2.5/test/test_bisect.pyR2¥stGetOnlycBseZdZd„ZRS(s:Dummy sequence class defining __getitem__ but not __len__.cCsdS(Ni
((Rtndx((s,/usr/local/lib/python2.5/test/test_bisect.pyt__getitem__¬s(R&R'R4R7(((s,/usr/local/lib/python2.5/test/test_bisect.pyR5ªstCmpErrcBseZdZd„ZRS(s;Dummy element that always raises an error during comparisoncCs
t‚dS(N(tZeroDivisionError(Rtother((s,/usr/local/lib/python2.5/test/test_bisect.pyt__cmp__±s(R&R'R4R;(((s,/usr/local/lib/python2.5/test/test_bisect.pyR8¯stTestErrorHandlingcBs5eZd„Zd„Zd„Zd„Zd„ZRS(cCs7x0ttttfD]}|it|ddƒqWdS(Ni
(RRRRtassertRaisest	TypeError(RR0((s,/usr/local/lib/python2.5/test/test_bisect.pyttest_non_sequence¶scCs:x3ttttfD]}|it|tƒdƒqWdS(Ni
(RRRRR=tAttributeErrorR2(RR0((s,/usr/local/lib/python2.5/test/test_bisect.pyt
test_len_onlyºscCs:x3ttttfD]}|it|tƒdƒqWdS(Ni
(RRRRR=R@R5(RR0((s,/usr/local/lib/python2.5/test/test_bisect.pyt
test_get_only¾scCsOtƒtƒtƒg}x0ttttfD]}|it||dƒq+WdS(Ni
(R8RRRRR=R9(RtseqR0((s,/usr/local/lib/python2.5/test/test_bisect.pyttest_cmp_errÂscCs4x-ttttfD]}|it|dƒqWdS(Ni
(RRRRR=R>(RR0((s,/usr/local/lib/python2.5/test/test_bisect.pyttest_arg_parsingÇs(R&R'R?RARBRDRE(((s,/usr/local/lib/python2.5/test/test_bisect.pyR<´s
				s^
Example from the Library Reference:  Doc/lib/libbisect.tex

The bisect() function is generally useful for categorizing numeric data.
This example uses bisect() to look up a letter grade for an exam total
(say) based on a set of ordered numeric breakpoints: 85 and up is an `A',
75..84 is a `B', etc.

    >>> grades = "FEDCBA"
    >>> breakpoints = [30, 44, 66, 75, 85]
    >>> from bisect import bisect
    >>> def grade(total):
    ...           return grades[bisect(breakpoints, total)]
    ...
    >>> grade(66)
    'C'
    >>> map(grade, [33, 99, 77, 44, 12, 88])
    ['E', 'A', 'B', 'D', 'F', 'A']

t
libreftestcCs÷ddkl}ddkl}ddk}ttg}tt|ƒo|i	t
ƒnti|Œti
||ƒ|ovt|dƒofddk}dgd}xAtt|ƒƒD]-}ti|Œ|iƒ|iƒ||<q¹W|GHndS(Niÿÿÿÿ(ttest_bisect(tBuiltinFunctionTypetgettotalrefcounti(ttestRGttypesRHtsysRR(t
isinstanceRtappendR<Rtrun_unittesttrun_doctestthasattrtgctNoneRRtcollectRI(tverboseRGRHRLttest_classesRRtcountsR((s,/usr/local/lib/python2.5/test/test_bisect.pyt	test_mainæs"



t__main__RU((((tunittestRJRRRRRRRRtTestCaseRR(R2R5R8R<RFt__test__RSRXR&tTrue(((s,/usr/local/lib/python2.5/test/test_bisect.pys<module>s.‹,


Man Man