Skip to content

Commit a34b63e

Browse files
committed
Remove deprecated %Z parameter in tests
1 parent 0d9ccc8 commit a34b63e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/test/test_strptime.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ def setUp(self):
658658
@skip_if_buggy_ucrt_strfptime
659659
def test_julian_calculation(self):
660660
# Make sure that when Julian is missing that it is calculated
661-
format_string = "%Y %m %d %H %M %S %w %Z"
661+
format_string = "%Y %m %d %H %M %S %w"
662662
result = _strptime._strptime_time(time.strftime(format_string, self.time_tuple),
663663
format_string)
664664
self.assertTrue(result.tm_yday == self.time_tuple.tm_yday,
@@ -668,7 +668,7 @@ def test_julian_calculation(self):
668668
@skip_if_buggy_ucrt_strfptime
669669
def test_gregorian_calculation(self):
670670
# Test that Gregorian date can be calculated from Julian day
671-
format_string = "%Y %H %M %S %w %j %Z"
671+
format_string = "%Y %H %M %S %w %j"
672672
result = _strptime._strptime_time(time.strftime(format_string, self.time_tuple),
673673
format_string)
674674
self.assertTrue(result.tm_year == self.time_tuple.tm_year and
@@ -683,7 +683,7 @@ def test_gregorian_calculation(self):
683683
@skip_if_buggy_ucrt_strfptime
684684
def test_day_of_week_calculation(self):
685685
# Test that the day of the week is calculated as needed
686-
format_string = "%Y %m %d %H %S %j %Z"
686+
format_string = "%Y %m %d %H %S %j"
687687
result = _strptime._strptime_time(time.strftime(format_string, self.time_tuple),
688688
format_string)
689689
self.assertTrue(result.tm_wday == self.time_tuple.tm_wday,

Lib/test/test_time.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def test_strptime(self):
325325
tt = time.gmtime(self.t)
326326
for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I',
327327
'j', 'm', 'M', 'p', 'S',
328-
'U', 'w', 'W', 'x', 'X', 'y', 'Y', 'Z', '%'):
328+
'U', 'w', 'W', 'x', 'X', 'y', 'Y', '%'):
329329
format = '%' + directive
330330
if directive == 'd':
331331
format += ',%Y' # Avoid GH-70647.

0 commit comments

Comments
 (0)