Skip to content

Commit 763ba9f

Browse files
committed
edit test_time
1 parent fd27077 commit 763ba9f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

Lib/test/test_time.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -718,9 +718,10 @@ class TestAsctime4dyear(_TestAsctimeYear, _Test4dYear, unittest.TestCase):
718718

719719

720720
class TestPytime(unittest.TestCase):
721+
# TODO: RUSTPYTHON
722+
@unittest.expectedFailure
721723
@skip_if_buggy_ucrt_strfptime
722-
@unittest.skip("TODO: RUSTPYTHON, AttributeError: module 'time' has no attribute '_STRUCT_TM_ITEMS'")
723-
# @unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support")
724+
@unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support")
724725
def test_localtime_timezone(self):
725726

726727
# Get the localtime and examine it for the offset and zone.
@@ -755,16 +756,18 @@ def test_localtime_timezone(self):
755756
self.assertEqual(new_lt.tm_gmtoff, lt.tm_gmtoff)
756757
self.assertEqual(new_lt9.tm_zone, lt.tm_zone)
757758

758-
@unittest.skip("TODO: RUSTPYTHON, AttributeError: module 'time' has no attribute '_STRUCT_TM_ITEMS'")
759-
# @unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support")
759+
# TODO: RUSTPYTHON
760+
@unittest.expectedFailure
761+
@unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support")
760762
def test_strptime_timezone(self):
761763
t = time.strptime("UTC", "%Z")
762764
self.assertEqual(t.tm_zone, 'UTC')
763765
t = time.strptime("+0500", "%z")
764766
self.assertEqual(t.tm_gmtoff, 5 * 3600)
765767

766-
@unittest.skip("TODO: RUSTPYTHON, AttributeError: module 'time' has no attribute '_STRUCT_TM_ITEMS'")
767-
# @unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support")
768+
# TODO: RUSTPYTHON
769+
@unittest.expectedFailure
770+
@unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support")
768771
def test_short_times(self):
769772

770773
import pickle

0 commit comments

Comments
 (0)