mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
edit test_time
This commit is contained in:
1 parent
fd270775a3
commit
763ba9fd6a
1 file changed
+9
-6
Vendored
+9
-6
@@ -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
|
||||
|
||||
Reference in new issue
Block a user