Skip to content
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

test_timezone_offset_calculation_1 fails on 32bit platforms #1204

Closed
wRAR opened this issue Dec 19, 2023 · 1 comment · Fixed by #1205
Closed

test_timezone_offset_calculation_1 fails on 32bit platforms #1204

wRAR opened this issue Dec 19, 2023 · 1 comment · Fixed by #1205

Comments

@wRAR
Copy link
Member

wRAR commented Dec 19, 2023

=================================== FAILURES ===================================
_____________ TestLocalTZOffset.test_timezone_offset_calculation_1 _____________

a = (<tests.test_timezone_parser.TestLocalTZOffset testMethod=test_timezone_offset_calculation_1>,)

    @wraps(func)
    def standalone_func(*a):
>       return func(*(a + p.args), **p.kwargs)

/usr/lib/python3/dist-packages/parameterized/parameterized.py:637: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/autopkgtest-lxc.mx1vnh9l/downtmp/autopkgtest_tmp/tests/test_timezone_parser.py:137: in test_timezone_offset_calculation
    self.given_time(utc, local)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_timezone_parser.TestLocalTZOffset testMethod=test_timezone_offset_calculation_1>
utc_dt_string = '2052-01-02 11:07', local_dt_string = '2052-01-02 10:07'

    def given_time(self, utc_dt_string, local_dt_string):
        datetime_cls = dateparser.timezone_parser.datetime
        if not isinstance(datetime_cls, Mock):
            datetime_cls = Mock(wraps=datetime)
>       utc_dt_obj = datetime.strptime(utc_dt_string, "%Y-%m-%d %H:%M").astimezone(
            dt.timezone.utc
        )
E       OverflowError: timestamp out of range for platform time_t
@wRAR wRAR added the Type: Bug label Dec 19, 2023
@wRAR
Copy link
Member Author

wRAR commented Dec 19, 2023

To be honest, I think we should just catch OverflowError and skip the test in that case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant