Skip to content

Commit 9c9e645

Browse files
committed
pythongh-120713: additional comment and formatting
1 parent ff7de92 commit 9c9e645

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Lib/test/datetimetester.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1697,8 +1697,11 @@ def test_bool(self):
16971697
self.assertTrue(self.theclass.max)
16981698

16991699
def test_strftime_y2k(self):
1700-
for y, o in ((1, 0), (49, -1), (70, 0), (99, 0), (100, -1),
1701-
(999, 0), (1000, 0), (1970, 0)):
1700+
# Test that years less than 1000 are 0-padded; note that the beginning
1701+
# an ISO 8601 year may fall in an ISO week of the year before, and
1702+
# therefore needs an offset of -1 when formatting with '%G'.
1703+
for y, o in ((1, 0), (49, -1), (70, 0), (99, 0), (100, -1), (999, 0),
1704+
(1000, 0), (1970, 0)):
17021705
for s in 'YG':
17031706
with self.subTest(year=y, specifier=s):
17041707
d = self.theclass(y, 1, 1)

0 commit comments

Comments
 (0)