edit test_time

This commit is contained in:
Jeong YunWon committed 2025-03-29 09:46:47 +09:00
1 parent fd270775a3
commit 763ba9fd6a
1 file changed
+9 -6
+9 -6
View File
@@ -718,9 +718,10 @@ class TestAsctime4dyear(_TestAsctimeYear, _Test4dYear, unittest.TestCase):
class TestPytime(unittest.TestCase):
# TODO: RUSTPYTHON
@unittest.expectedFailure
@skip_if_buggy_ucrt_strfptime
@unittest.skip("TODO: RUSTPYTHON, AttributeError: module 'time' has no attribute '_STRUCT_TM_ITEMS'")
# @unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support")
@unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support")
def test_localtime_timezone(self):
# Get the localtime and examine it for the offset and zone.
@@ -755,16 +756,18 @@ class TestPytime(unittest.TestCase):
self.assertEqual(new_lt.tm_gmtoff, lt.tm_gmtoff)
self.assertEqual(new_lt9.tm_zone, lt.tm_zone)
@unittest.skip("TODO: RUSTPYTHON, AttributeError: module 'time' has no attribute '_STRUCT_TM_ITEMS'")
# @unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support")
# TODO: RUSTPYTHON
@unittest.expectedFailure
@unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support")
def test_strptime_timezone(self):
t = time.strptime("UTC", "%Z")
self.assertEqual(t.tm_zone, 'UTC')
t = time.strptime("+0500", "%z")
self.assertEqual(t.tm_gmtoff, 5 * 3600)
@unittest.skip("TODO: RUSTPYTHON, AttributeError: module 'time' has no attribute '_STRUCT_TM_ITEMS'")
# @unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support")
# TODO: RUSTPYTHON
@unittest.expectedFailure
@unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support")
def test_short_times(self):
import pickle