Skip to content

Commit edfed51

Browse files
committed
test '\s+' functionality, as requested
1 parent 5193157 commit edfed51

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

Lib/test/test_strptime.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -671,10 +671,16 @@ def test_strptime_D_format(self):
671671
)
672672

673673
def test_strptime_t_format(self):
674-
test_date = "2026\t02\t16"
674+
test_year,test_month,test_day = 2026,2,20
675675
self.assertEqual(
676-
time.strptime(test_date, "%Y%t%m%t%d"),
677-
time.strptime(test_date, "%Y\t%m\t%d")
676+
time.strptime(
677+
f'{test_year} \r {test_month}\t \n{test_day}',
678+
"%Y%t%m%t%d"
679+
),
680+
time.strptime(
681+
f'{test_year}-{test_month}-{test_day}',
682+
"%Y-%m-%d"
683+
)
678684
)
679685

680686
class Strptime12AMPMTests(unittest.TestCase):

0 commit comments

Comments
 (0)