Skip to content

Test failure: test_tzlocal_offset_equal[GMT-tzoff1] (dateutil 2.8.0) #918

@koobs

Description

@koobs

Running into the following test failure while QA'ing dateutil 2.8.0 to update the FreeBSD port:

tzvar = 'GMT', tzoff = tzoffset(u'GMT', 0)

    @mark_tzlocal_nix
    @pytest.mark.parametrize('tzvar, tzoff', [
        ('EST5', tz.tzoffset('EST', -18000)),
        ('GMT', tz.tzoffset('GMT', 0)),
        ('YAKT-9', tz.tzoffset('YAKT', timedelta(hours=9))),
        ('JST-9', tz.tzoffset('JST', timedelta(hours=9))),
    ])
    def test_tzlocal_offset_equal(tzvar, tzoff):
        with TZEnvContext(tzvar):
            # Including both to test both __eq__ and __ne__
>           assert tz.tzlocal() == tzoff
E           AssertionError: assert tzlocal() == tzoffset(u'GMT', 0)
E             -tzlocal()
E             +tzoffset(u'GMT', 0)

dateutil/test/test_tz.py:1008: AssertionError

System/test environment is:

platform freebsd13 -- Python 2.7.16, pytest-4.5.0, py-1.8.0, pluggy-0.11.0 -- /usr/local/bin/python2.7
plugins: xdist-1.28.0, mock-1.10.4, forked-1.0.2, cov-2.7.1, hypothesis-4.23.6

System timezone is Australia/Sydney:

# tail -n 1 /etc/localtime
AEST-10AEDT,M10.1.0,M4.1.0/3

I've tried setting TZ=UTC and TZ=other-non-utc-timezones environment variables without affect.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions