From a34b63eed41b66bed934dbf64b1ece266a608d6d Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Fri, 6 Jun 2025 14:40:49 +0800 Subject: [PATCH] Remove deprecated %Z parameter in tests --- Lib/test/test_strptime.py | 6 +++--- Lib/test/test_time.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/test/test_strptime.py b/Lib/test/test_strptime.py index 268230f6da78f8..c304521420274c 100644 --- a/Lib/test/test_strptime.py +++ b/Lib/test/test_strptime.py @@ -658,7 +658,7 @@ def setUp(self): @skip_if_buggy_ucrt_strfptime def test_julian_calculation(self): # Make sure that when Julian is missing that it is calculated - format_string = "%Y %m %d %H %M %S %w %Z" + format_string = "%Y %m %d %H %M %S %w" result = _strptime._strptime_time(time.strftime(format_string, self.time_tuple), format_string) self.assertTrue(result.tm_yday == self.time_tuple.tm_yday, @@ -668,7 +668,7 @@ def test_julian_calculation(self): @skip_if_buggy_ucrt_strfptime def test_gregorian_calculation(self): # Test that Gregorian date can be calculated from Julian day - format_string = "%Y %H %M %S %w %j %Z" + format_string = "%Y %H %M %S %w %j" result = _strptime._strptime_time(time.strftime(format_string, self.time_tuple), format_string) self.assertTrue(result.tm_year == self.time_tuple.tm_year and @@ -683,7 +683,7 @@ def test_gregorian_calculation(self): @skip_if_buggy_ucrt_strfptime def test_day_of_week_calculation(self): # Test that the day of the week is calculated as needed - format_string = "%Y %m %d %H %S %j %Z" + format_string = "%Y %m %d %H %S %j" result = _strptime._strptime_time(time.strftime(format_string, self.time_tuple), format_string) self.assertTrue(result.tm_wday == self.time_tuple.tm_wday, diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index 5312faa50774ec..cbc6a7f480ffe2 100644 --- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -325,7 +325,7 @@ def test_strptime(self): tt = time.gmtime(self.t) for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I', 'j', 'm', 'M', 'p', 'S', - 'U', 'w', 'W', 'x', 'X', 'y', 'Y', 'Z', '%'): + 'U', 'w', 'W', 'x', 'X', 'y', 'Y', '%'): format = '%' + directive if directive == 'd': format += ',%Y' # Avoid GH-70647. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy