python (3.12.0)
ΑeZ d Z ddlZddlZddlZddlZddlZddlZddlmZ ddl m
Z
ddlmZ
ddlZ G d dej Z G d d ej Z G d
dej Z G d d
ej Z G d dej Z G d dej Z G d dej Z G d dej Zedk( r ej2 yy)zPyUnit testing against strptime N)support)skip_if_buggy_ucrt_strfptime)datec e Zd ZdZd Zy)
getlang_Testsz
Test _getlangc | j t j t j t j
y N)assertEqual _strptime_getlanglocale getlocaleLC_TIMEselfs F/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_strptime.py
test_basiczgetlang_Tests.test_basic s* ++-v/?/?/OP N)__name__
__module____qualname____doc__r r r r r s Qr r c e Zd ZdZd Zd Zd Zd Zd Z e j ej d d Z
d Zd
Zy)LocaleTime_TestszTests for _strptime.LocaleTime.
All values are lower-cased when stored in LocaleTime, so make sure to
compare values after running ``lower`` on them.
c h t j | _ t j | _ y)z(Create time tuple based on current time.N)time localtime
time_tupler
LocaleTimeLT_insr s r setUpzLocaleTime_Tests.setUp s ..***,r c t j || j j }|| j | }| j ||d|z | j |||d|d| y)zHelper method that tests testing against directive based on the
tuple_position of time_tuple. Uses error_msg as error message.
z%s: not found in tuplez#: position within tuple incorrect; != N)r strftimer lowerassertInr
)r testing directivetuple_position error_msgstrftime_output
comparisons r compare_against_timez%LocaleTime_Tests.compare_against_time! sl -- 4??CIIKT__^<=
ow.: <_#ZB Cr c | j | j j ddd | j | j j ddd y )N%A z#Testing of full weekday name failed%az*Testing of abbreviated weekday name failed)r. r! f_weekday a_weekdayr s r test_weekdayzLocaleTime_Tests.test_weekday/ sH
!!$++"7"7q"G I!!$++"7"7q"N Pr c | j | j j ddd | j | j j ddd y )N%B z&Testing against full month name failedz%bz-Testing against abbreviated month name failed)r. r! f_montha_monthr s r
test_monthzLocaleTime_Tests.test_month7 sH
!!$++"5"5tQ"J L!!$++"5"5tQ"Q Sr c 0 t j d| j j }| j || j
j d | j d dk rd}nd}| j | j
j | |d y )Nz%pz!AM/PM representation not in tuple r r8 z;AM/PM representation in the wrong position within the tuple)r r% r r&