File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1213,18 +1213,18 @@ def test_strptime_leap_year(self):
12131213 date .strptime ('02-29,2024' , '%m-%d,%Y' )
12141214
12151215 def test_strptime_F_format (self ):
1216- formats = dict (short = "%F" ,long = "%Y-%m-%d" )
12171216 test_date = "2025-10-26"
1218- shorthand = datetime .strptime (test_date ,formats ["short" ])
1219- long_hand = datetime .strptime (test_date ,formats ["long" ])
1220- self .assertEqual (shorthand ,long_hand )
1217+ self .assertEqual (
1218+ datetime .strptime (test_date ,"%F" ),
1219+ datetime .strptime (test_date ,"%Y-%m-%d" )
1220+ )
12211221
12221222 def test_strptime_T_format (self ):
1223- formats = dict (short = "%T" ,long = "%H:%M:%S" )
12241223 test_time = "15:00:00"
1225- shorthand = datetime .strptime (test_time ,formats ["short" ])
1226- long_hand = datetime .strptime (test_time ,formats ["long" ])
1227- self .assertEqual (shorthand ,long_hand )
1224+ self .assertEqual (
1225+ datetime .strptime (test_time ,"%T" ),
1226+ datetime .strptime (test_time ,"%H:%M:%S" )
1227+ )
12281228
12291229class SubclassDate (date ):
12301230 sub_var = 1
You can’t perform that action at this time.
0 commit comments