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

hRc@s[dZddkZddkZddkZddkZddkZddklZddkl	Z
ddkZdeifdYZ
deifdYZd	eifd
YZdeifdYZd
eifdYZdeifdYZdeifdYZdeifdYZdZedjoendS(sPyUnit testing against strptimeiN(ttest_support(tdatet
getlang_TestscBseZdZdZRS(s
Test _getlangcCs&|itititidS(N(tfailUnlessEqualt	_strptimet_getlangtlocalet	getlocaletLC_TIME(tself((s./usr/local/lib/python2.5/test/test_strptime.pyt
test_basics(t__name__t
__module__t__doc__R
(((s./usr/local/lib/python2.5/test/test_strptime.pyR
stLocaleTime_TestscBsVeZdZdZdZdZdZdZdZdZ	dZ
RS(	sTests for _strptime.LocaleTime.

    All values are lower-cased when stored in LocaleTime, so make sure to
    compare values after running ``lower`` on them.

    cCs"ti|_ti|_dS(s(Create time tuple based on current time.N(ttimet	localtimet
time_tupleRt
LocaleTimetLT_ins(R	((s./usr/local/lib/python2.5/test/test_strptime.pytsetUpscCsmti||ii}||i|}|i||jd||i||jd|||fdS(sHelper method that tests testing against directive based on the
        tuple_position of time_tuple.  Uses error_msg as error message.

        s%s: not found in tuples-%s: position within tuple incorrect; %s != %sN(RtstrftimeRtlowert
failUnless(R	ttestingt	directivettuple_positiont	error_msgtstrftime_outputt
comparison((s./usr/local/lib/python2.5/test/test_strptime.pytcompare_against_timescCs<|i|iiddd|i|iiddddS(Ns%Ais#Testing of full weekday name faileds%as*Testing of abbreviated weekday name failed(RRt	f_weekdayt	a_weekday(R	((s./usr/local/lib/python2.5/test/test_strptime.pyttest_weekday-scCs<|i|iiddd|i|iiddddS(Ns%Bis&Testing against full month name faileds%bs-Testing against abbreviated month name failed(RRtf_monthta_month(R	((s./usr/local/lib/python2.5/test/test_strptime.pyt
test_month5scCstid|ii}|i||iijd|iddjo
d}nd}|i||ii|jddS(Ns%ps!AM/PM representation not in tupleiiiis;AM/PM representation in the wrong position within the tuple(RRRRRRtam_pm(R	Rtposition((s./usr/local/lib/python2.5/test/test_strptime.pyt
test_am_pm=s
cCsqtid|ii}|oK|i||iidjp||iidjd||iifndS(Ns%Ziistimezone %s not found in %s(RRRRRRttimezone(R	R(((s./usr/local/lib/python2.5/test/test_strptime.pyt
test_timezoneGsc	Csd}tid
|}|i|ti|ii|jdtid|}|i|ti|ii|jd
tid|}|i|ti|ii|jdti}d|_	|i|iddS(Niiiii,i7iiLis%csLC_date_time incorrects%xsLC_date incorrects%XsLC_time incorrectts6LocaleTime's LC directives cannot handle empty strings(	iiiii,i7iiLi(R*R*(
RRRRtLC_date_timetLC_datetLC_timeRRR%(R	t
magic_dateRtLT((s./usr/local/lib/python2.5/test/test_strptime.pyttest_date_timePs 				cCs |i|iitidS(N(RRtlangRR(R	((s./usr/local/lib/python2.5/test/test_strptime.pyt	test_langis(RRR
RRR!R$R'R)R0R2(((s./usr/local/lib/python2.5/test/test_strptime.pyRs					
			tTimeRETestscBsVeZdZdZdZdZdZdZdZdZ	dZ
RS(	sTests for TimeRE.cCs"ti|_ti|_dS(s Construct generic TimeRE object.N(RtTimeREttime_reRtlocale_time(R	((s./usr/local/lib/python2.5/test/test_strptime.pyRrscCs|iid}|i|i|iiddjd||i|i|iiddjd||i|i|iddjd|dS(	Ns%a %A %diis7did not find abbreviated weekday in pattern string '%s'is0did not find full weekday in pattern string '%s'tds.did not find 'd' directive pattern string '%s'(R5tpatternRtfindR6R R(R	tpattern_string((s./usr/local/lib/python2.5/test/test_strptime.pyttest_patternws""cCs0|iid}|id|jd|dS(Ns\d+s\\d\+s/%s does not have re characters escaped properly(R5R8R(R	R:((s./usr/local/lib/python2.5/test/test_strptime.pyttest_pattern_escapingscCs|iidi|iid}|i|o|id|iidjd|iid}|id|iid|iidf}|i|d|i	d|iid|iidff|i|id	|iidjo|id
|iidjd|i
|ii	|id	|id
fxjd D]b}|iid|}|iti
d|}|i|dti
d||i	fqJWdS(!Ns%AitAsre object for '%A' faileds%a %bs%s %sis,Match failed with '%s' regex and '%s' stringtatbskre object couldn't find the abbreviated weekday month in '%s' using '%s'; group 'a' = '%s', group 'b' = %s'tBtcR7tHtItjtmtMtptStUtwtWtxtXtytYtZt%s(Matching failed on '%s' using '%s' regex(R>R=R?R@RAR7RBRCRDRERFRGRHRIRJRKRLRMRNRORPRQ(R5tcompiletmatchR6RRtgroupR R#R8tstringtreRR(R	tfoundtcompiledR((s./usr/local/lib/python2.5/test/test_strptime.pyttest_compiles.%)	&cCsMti}ttf|_|iti|iddjddS(Ns%ZR*s6with timezone == ('',''), TimeRE().pattern('%Z') != ''(RRt	frozensetR(RR4R8(R	ttest_locale((s./usr/local/lib/python2.5/test/test_strptime.pyttest_blankpatterns!cCs5|iid}|id}|i|ddS(Ns\w+ %ms\w+ 10s"Escaping failed of format '\w+ 10'(R5RRRSR(R	tcompiled_reRW((s./usr/local/lib/python2.5/test/test_strptime.pyttest_matching_with_escapesscCs\ti}tdtdf|_ti|}|i|ididddS(NtutctgmtsTokyo (standard time)sTokyo (daylight time)s%ZsFlocale data that contains regex metacharacters is not properly escaped(R_R`sTokyo (standard time)(RRRZR(R4RRRRS(R	R6R5((s./usr/local/lib/python2.5/test/test_strptime.pyt'test_locale_data_w_regex_metacharactersscCsI|iid}|iti|d|iti|ddS(Ns%j %Ht180s18 0(R5R8RRVRS(R	R8((s./usr/local/lib/python2.5/test/test_strptime.pyttest_whitespace_substitutions(RRR
RR;R<RYR\R^RaRc(((s./usr/local/lib/python2.5/test/test_strptime.pyR3os		
					
t
StrptimeTestscBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZRS(sTests for _strptime.strptime.cCsti|_dS(sCreate testing time tuple.N(RtgmtimeR(R	((s./usr/local/lib/python2.5/test/test_strptime.pyRscCs|ittiddddx}dD]u}ytid|WnGtj
o
q&q&tj
o&}|id	||iifq&X|id
|q&WdS(Ntdata_strings%dtformats%ARQs% s%et2005s'%s' raised %s, not ValueErrors'%s' did not raise ValueError(RQs% s%e(tassertRaisest
ValueErrorRtstrptimet	Exceptiontfailt	__class__R(R	t
bad_formatterr((s./usr/local/lib/python2.5/test/test_strptime.pyttest_ValueErrors	cCs|ittidddS(Ns10 12s%m(RiRjRRk(R	((s./usr/local/lib/python2.5/test/test_strptime.pyttest_unconverteddatascCsotid||i}ti|d|}|i|||i|jd|||||i|fdS(sHelper fxn in testing.RQs2testing of '%s' directive failed; '%s' -> %s != %sN(RRRRRkR(R	RR&tstrf_outputtstrp_output((s./usr/local/lib/python2.5/test/test_strptime.pythelpers
c
CsxdD]}|i|dqWxdd
fddffD]g\}}xX|D]P}ti|d
}|t|}|i|d|jd||dfqMWq:WdS(NRNROiilt69t99it00t68s%ys1'y' test failed; passed in '%s' and returned '%s'(RNRO(RvRw(RxRy(RuRRktintR(R	RtcenturytboundstboundRttexpected_result((s./usr/local/lib/python2.5/test/test_strptime.pyt	test_yearscCs%xdD]}|i|dqWdS(NR@R?REi(R@R?RE(Ru(R	R((s./usr/local/lib/python2.5/test/test_strptime.pyR$scCs|idddS(NR7i(Ru(R	((s./usr/local/lib/python2.5/test/test_strptime.pyttest_dayscCst|iddtid|i}ti|d}|i|d|idjd||d|idfdS(NRBis%I %ps7testing of '%%I %%p' directive failed; '%s' -> %s != %s(RuRRRRRkR(R	RsRt((s./usr/local/lib/python2.5/test/test_strptime.pyt	test_hourscCs|idddS(NRFi(Ru(R	((s./usr/local/lib/python2.5/test/test_strptime.pyttest_minutescCs|idddS(NRHi(Ru(R	((s./usr/local/lib/python2.5/test/test_strptime.pyttest_secondscCs%xdD]}|i|dqWdS(NR=R>RJi(R=R>RJ(Ru(R	R((s./usr/local/lib/python2.5/test/test_strptime.pyR!scCs|idddS(NRDi(Ru(R	((s./usr/local/lib/python2.5/test/test_strptime.pyttest_julianscCstidd}|i|idtidd}|i|idtidjodSnti}tid}ti|d}ti	}ti
dti
djptio7|i|d|djd||d|dfn|i|dd	jd
dS(NtUTCs%ZitGMTtmaciis'timezone check failed; '%s' -> %s != %sis]LocaleTime().timezone has duplicate values and time.daylight but timezone value not set to -1(
RRkRttm_isdsttsystplatformRRRRttznametdaylightR(R	RtRRsR6((s./usr/local/lib/python2.5/test/test_strptime.pyR)s &cCstidjodSntid}|id
jodSnzmti}ti}||ft_dt_ti|dd}|i|dd	ti|ti|fWd|t_|t_XdS(NRiRRis%Ziis^%s lead to a timezone value of %s instead of -1 when time.daylight set to %s and passing in %s(sUTCsGMT(	RRRRtupperRRRkR(R	ttz_nametoriginal_tznametoriginal_daylightttz_value((s./usr/local/lib/python2.5/test/test_strptime.pyttest_bad_timezone6s 
				cCs+x$tdD]}|id|q
WdS(NiRA(trangeRu(R	R&((s./usr/local/lib/python2.5/test/test_strptime.pyR0Ls
cCs.x'tddD]}|id|qWdS(NiiRL(RRu(R	R&((s./usr/local/lib/python2.5/test/test_strptime.pyt	test_dateQscCs.x'tddD]}|id|qWdS(NiiRM(RRu(R	R&((s./usr/local/lib/python2.5/test/test_strptime.pyt	test_timeVscCsdtid|i}ti|d}|i|d|idjo|d|idjddS(Ns%m %% %Yiishandling of percent sign failed(RRRRRkR(R	RsRt((s./usr/local/lib/python2.5/test/test_strptime.pyttest_percent[s
cCstid|i}|iti|idd|iti|idd|iti|idddS(Ns%Bs0strptime does not handle ALL-CAPS names properlys1strptime does not handle lowercase names properlys/strptime does not handle capword names properly(	RRRRRRkRRt
capitalize(R	Rs((s./usr/local/lib/python2.5/test/test_strptime.pyttest_caseinsensitivecsc	Cs<d}tidd}|i||jd||fdS(	Niliiit1s%ms5Default values for strptime() are incorrect; %s != %s(	iliiiiiiii(RRkR(R	tdefaultsRt((s./usr/local/lib/python2.5/test/test_strptime.pyt
test_defaultsms
cCs#d}|iti||dS(Ns.^$*+?{}\[]|)((RRRk(R	t
need_escaping((s./usr/local/lib/python2.5/test/test_strptime.pyt
test_escapingus(RRR
RRqRrRuRR$RRRRR!RR)RR0RRRRRR(((s./usr/local/lib/python2.5/test/test_strptime.pyRds,						
															
	tStrptime12AMPMTestscBseZdZdZRS(s9Test a _strptime regression in '%I %p' at 12 noon (12 PM)cCs|i}|tidddd|tidddd|tidddd|tidddddS(Ns12 PMs%I %piis12 AMi(tassertEqualRRkR(R	teq((s./usr/local/lib/python2.5/test/test_strptime.pyttest_twelve_noon_midnights
	(RRR
R(((s./usr/local/lib/python2.5/test/test_strptime.pyR~stJulianTestscBseZdZdZRS(s@Test a _strptime regression that all julian (1-366) are acceptedcCsH|i}x8tddD]'}|tid|dd|qWdS(Niios%d 2004s%j %Yi(RRRRk(R	Rti((s./usr/local/lib/python2.5/test/test_strptime.pyttest_all_julian_dayss	(RRR
R(((s./usr/local/lib/python2.5/test/test_strptime.pyRstCalculationTestscBs;eZdZdZdZdZdZdZRS(s4Test that strptime() fills in missing info correctlycCsti|_dS(N(RReR(R	((s./usr/local/lib/python2.5/test/test_strptime.pyRscCs]d}titi||i|}|i|i|iijd|i|iifdS(Ns%Y %m %d %H %M %S %w %Zs'Calculation of tm_yday failed; %s != %s(RRkRRRRttm_yday(R	t
format_stringtresult((s./usr/local/lib/python2.5/test/test_strptime.pyttest_julian_calculations	c	Csd}titi||i|}|i|i|iijo)|i|iijo|i|iijd|i|i|i|ii|ii|iifdS(Ns%Y %H %M %S %w %j %Zs9Calculation of Gregorian date failed;%s-%s-%s != %s-%s-%s(	RRkRRRRttm_yearttm_monttm_mday(R	RR((s./usr/local/lib/python2.5/test/test_strptime.pyttest_gregorian_calculations	cCs]d}titi||i|}|i|i|iijd|i|iifdS(Ns%Y %m %d %H %S %j %Zs.Calculation of day of the week failed;%s != %s(RRkRRRRttm_wday(R	RR((s./usr/local/lib/python2.5/test/test_strptime.pyttest_day_of_week_calculations	csfd}|d-d|d.d|d/d	|d0d|d1d
|d2d|d3d|d4d|d5d|d6d|d7d|d8d|d9d|d:d!|d;d$|d<d%|d=d'|d>d(|d?d*|d@d,dS(ANcsxdD]}d|}t|}|i|}ti||}i|d |jd||||d ||d|idfqWdS(NRKRIs%%Y %%%s %%wis/%s(%s) test failed w/ '%s': %s != %s (%s != %s)i(RKRI(t
datetime_dateRRRkRt	timetuple(t	ymd_tuplettest_reasonRRtdt_datet
strp_inputRt(R	(s./usr/local/lib/python2.5/test/test_strptime.pyttest_helpers
	
imiisweek 0iscommon casei
s
day on Sundayis
day on MondayiqsJan 1 on SundayirsJan 1 on Mondayis)first Sunday in a year starting on MondayiisDec 31 on SundaysDec 31 on Mondayiis#Monday in the last week of the yearis-Monday in the second-to-last week of the yearii
israndomly chosen dateiisEyear starting and ending on Monday while date not on Sunday or Mondayi}isXyear starting and ending on Monday with a Monday not at the beginning or end of the years8Dec 31 on Monday with year starting and ending on MondayisFirst Sunday of 2007sSecond Sunday of 2007isLast Sunday of 2006isSecond to last Sunday of 2006(imii(imii(imii
(imii(iqii(irii(irii(iqii(irii(iii(iii(ii
i(iii(ii
i(i}ii(i}ii(iii(iii(iii(iii((R	R((R	s./usr/local/lib/python2.5/test/test_strptime.pyt-test_week_of_year_and_day_of_week_calculations*


















(RRR
RRRRR(((s./usr/local/lib/python2.5/test/test_strptime.pyRs						t
CacheTestscBs2eZdZdZdZdZdZRS(s!Test that caching works properly.cCstiddtidddtii_tti}tidd|i|tti|itti	ddS(Nt10s%dRhs%YtNii(
RRkt
_TimeRE_cacheR6R1tidtfailIfEqualRtlent_regex_cache(R	toriginal_time_re((s./usr/local/lib/python2.5/test/test_strptime.pyttest_time_re_recreationscCsytid=Wntj
onXd}x5ttitijodti|<|d7}q-Wtidd|ittiddS(Ns%diiR(RRtKeyErrorRt_CACHE_MAX_SIZEtNoneRkR(R	t	bogus_key((s./usr/local/lib/python2.5/test/test_strptime.pyttest_regex_cleanups
cCsQttii}dtii_tidd|i|ttiidS(NRRs%d(RRRR6R1RkR(R	tlocale_time_id((s./usr/local/lib/python2.5/test/test_strptime.pyttest_new_localetimes
	c
Cstiti}ytitidWntij
odSnXztiddtti}yFtitidtiddtti}|i	||Wntij
onXWdtiti|XdS(Nten_UStUTF8Rs%dtde_DE(RR(RR(
RRRt	setlocaletErrorRRkRRR(R	tlocale_infotfirst_time_re_idtsecond_time_re_id((s./usr/local/lib/python2.5/test/test_strptime.pyttest_TimeRE_recreations 		(RRR
RRRR(((s./usr/local/lib/python2.5/test/test_strptime.pyRs
		
		c	Cs&titttttttt	dS(N(
Rtrun_unittestRRR3RdRRRR(((s./usr/local/lib/python2.5/test/test_strptime.pyt	test_main#st__main__(R
tunittestRRRVRttestRtdatetimeRRRtTestCaseRRR3RdRRRRRR(((s./usr/local/lib/python2.5/test/test_strptime.pys<module>s&][	OB	



Man Man