Skip to content

Commit 2e94037

Browse files
authored
Update test_strptime.py to use unittest methods, as requested
1 parent 634ecea commit 2e94037

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/test_strptime.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ def test_shorthand_year_month_day(self):
660660
import datetime
661661
shorthand = datetime.datetime.strptime(test_date,formats["short"])
662662
long_hand = datetime.datetime.strptime(test_date,formats["long"])
663-
assert shorthand == long_hand
663+
self.assertEqual(shorthand,long_hand)
664664

665665
def test_shorthand_hour_minute_second(self):
666666
# Test that token '%T' is equivalent to '%H:%M:%S'
@@ -673,7 +673,7 @@ def test_shorthand_hour_minute_second(self):
673673
import datetime
674674
shorthand = datetime.datetime.strptime(test_time,formats["short"])
675675
long_hand = datetime.datetime.strptime(test_time,formats["long"])
676-
assert shorthand == long_hand
676+
self.assertEqual(shorthand,long_hand)
677677

678678
class Strptime12AMPMTests(unittest.TestCase):
679679
"""Test a _strptime regression in '%I %p' at 12 noon (12 PM)"""

0 commit comments

Comments
 (0)