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 3eece9e commit 77280dbCopy full SHA for 77280db
Lib/test/datetimetester.py
@@ -2237,8 +2237,7 @@ def test_strptime_C_format(self):
2237
2238
def test_strptime_C_y_format(self):
2239
# verify %y correctly augmented by century %C
2240
- test_years = ('0001', '1687', '1991', '2026')
2241
- for y in test_years:
+ for y in ('0001', '1687', '1991', '2026'):
2242
with self.subTest(format_directive="%C%y", year=y):
2243
self.assertEqual(
2244
self.theclass.strptime(y, "%C%y"),
Lib/test/test_strptime.py
@@ -689,8 +689,7 @@ def test_strptime_n_and_t_format(self):
689
690
def test_strptime_C_format(self):
691
# verify cent. 0, zero-padding, modern cent., last supported cent.
692
- test_centuries = ('0', '01', '20', '99')
693
- for c in test_centuries:
+ for c in ('0', '01', '20', '99'):
694
expected_year = int(c) * 100 if int(c) != 0 else 1
695
with self.subTest(format_directive="C", century=c):
696
@@ -700,8 +699,7 @@ def test_strptime_C_format(self):
700
699
701
702
703
704
- for year in test_years:
+ for year in ('0001', '1687', '1991', '2026'):
705
with self.subTest(format_directive="%C%y", year=year):
706
707
time.strptime(year, '%C%y'),
0 commit comments