8000 4982 - Implement tm_gmtoff and tm_zone by JazzGlobal · Pull Request #5391 · RustPython/RustPython · GitHub
[go: up one dir, main page]

Skip to content

4982 - Implement tm_gmtoff and tm_zone #5391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
edit test_time
  • Loading branch information
youknowone committed Mar 29, 2025
commit 763ba9fd6ac4093fb79f24032645d8596e09fcea
15 changes: 9 additions & 6 deletions Lib/test/test_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -755,16 +756,18 @@ def test_localtime_timezone(self):
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 513F support")
def test_short_times(self):

import pickle
Expand Down
Loading
0