We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a928e6 commit 029ed4fCopy full SHA for 029ed4f
Lib/test/test_strptime.py
@@ -650,11 +650,11 @@ def test_mar1_comes_after_feb29_even_when_omitting_the_year(self):
650
time.strptime("Mar 1", "%b %d"))
651
652
def test_shorthand_year_month_day(self):
653
- formats = dict(short="%F",long="%Y-%m-%d")
654
test_date = "2025-10-26"
655
- shorthand = time.strptime(test_date,formats["short"])
656
- long_hand = time.strptime(test_date,formats["long"])
657
- self.assertEqual(shorthand,long_hand)
+ self.assertEqual(
+ time.strptime(test_date,"%F"),
+ time.strptime(test_date,"%Y-%m-%d")
+ )
658
659
def test_shorthand_hour_minute_second(self):
660
# Test that token '%T' is equivalent to '%H:%M:%S'
0 commit comments