Skip to content

Commit 77280db

Browse files
committed
remove variables from tests
1 parent 3eece9e commit 77280db

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

Lib/test/datetimetester.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2237,8 +2237,7 @@ def test_strptime_C_format(self):
22372237

22382238
def test_strptime_C_y_format(self):
22392239
# verify %y correctly augmented by century %C
2240-
test_years = ('0001', '1687', '1991', '2026')
2241-
for y in test_years:
2240+
for y in ('0001', '1687', '1991', '2026'):
22422241
with self.subTest(format_directive="%C%y", year=y):
22432242
self.assertEqual(
22442243
self.theclass.strptime(y, "%C%y"),

Lib/test/test_strptime.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,7 @@ def test_strptime_n_and_t_format(self):
689689

690690
def test_strptime_C_format(self):
691691
# verify cent. 0, zero-padding, modern cent., last supported cent.
692-
test_centuries = ('0', '01', '20', '99')
693-
for c in test_centuries:
692+
for c in ('0', '01', '20', '99'):
694693
expected_year = int(c) * 100 if int(c) != 0 else 1
695694
with self.subTest(format_directive="C", century=c):
696695
self.assertEqual(
@@ -700,8 +699,7 @@ def test_strptime_C_format(self):
700699

701700
def test_strptime_C_y_format(self):
702701
# verify %y correctly augmented by century %C
703-
test_years = ('0001', '1687', '1991', '2026')
704-
for year in test_years:
702+
for year in ('0001', '1687', '1991', '2026'):
705703
with self.subTest(format_directive="%C%y", year=year):
706704
self.assertEqual(
707705
time.strptime(year, '%C%y'),

0 commit comments

Comments
 (0)