Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 942988 - dev-python/sphinx-8.1.3 fails test tests/test_util/test_util_i18n.py::test_format_date_timezone
Summary: dev-python/sphinx-8.1.3 fails test tests/test_util/test_util_i18n.py::test_fo...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-07 12:31 UTC by Jonathan Lovelace
Modified: 2024-11-10 17:39 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dev-python:sphinx-8.1.3:20241107-004805.log (dev-python:sphinx-8.1.3:20241107-004805.log,450.23 KB, text/plain; charset=utf-8)
2024-11-07 12:31 UTC, Jonathan Lovelace
Details
emerge-info.txt (emerge-info.txt,8.63 KB, text/plain; charset=utf-8)
2024-11-07 12:31 UTC, Jonathan Lovelace
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Lovelace 2024-11-07 12:31:27 UTC
Created attachment 908078 [details]
dev-python:sphinx-8.1.3:20241107-004805.log

When my mostly-stable system tries to upgrade dev-python/sphinx to the newly-stabilized version 8.1.3, it fails its test phase, specifically the test tests/test_util/test_util_i18n.py::test_format_date_timezone:

__________________________________________________________________________ test_format_date_timezone ___________________________________________________________________________

    def test_format_date_timezone():
        dt = datetime.datetime(2016, 8, 7, 5, 11, 17, 0, tzinfo=datetime.timezone.utc)
        if time.localtime(dt.timestamp()).tm_gmtoff == 0:
            raise pytest.skip('Local time zone is GMT')  # NoQA: EM101

        fmt = '%Y-%m-%d %H:%M:%S'

        iso_gmt = dt.isoformat(' ').split('+')[0]
        fd_gmt = i18n.format_date(fmt, date=dt, language='en', local_time=False)
        assert fd_gmt == '2016-08-07 05:11:17'
        assert fd_gmt == iso_gmt

        iso_local = dt.astimezone().isoformat(' ').split('+')[0]
        fd_local = i18n.format_date(fmt, date=dt, language='en', local_time=True)
>       assert fd_local == iso_local
E       AssertionError: assert '2016-08-07 01:11:17' == '2016-08-07 01:11:17-04:00'
E
E         - 2016-08-07 01:11:17-04:00
E         ?                    ------
E         + 2016-08-07 01:11:17

dt         = datetime.datetime(2016, 8, 7, 5, 11, 17, tzinfo=datetime.timezone.utc)
fd_gmt     = '2016-08-07 05:11:17'
fd_local   = '2016-08-07 01:11:17'
fmt        = '%Y-%m-%d %H:%M:%S'
iso_gmt    = '2016-08-07 05:11:17'
iso_local  = '2016-08-07 01:11:17-04:00'

tests/test_util/test_util_i18n.py:111: AssertionError
Comment 1 Jonathan Lovelace 2024-11-07 12:31:50 UTC
Created attachment 908079 [details]
emerge-info.txt
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-11-10 16:49:26 UTC
What's your timezone setup?
Comment 3 Jonathan Lovelace 2024-11-10 17:39:30 UTC
/etc/timezone contains "America/Detroit" (not in quotes), and /etc/localtime is identical to /usr/share/zoneinfo/America/Detroit.