You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ra...@apache.org on 2023/06/30 09:56:59 UTC

[arrow] branch main updated: GH-36349: [Python][CI] Avoid using 'build/etc/localtime' timezone in hypothesis tests (#36391)

This is an automated email from the ASF dual-hosted git repository.

raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 8fb4bf5ece GH-36349: [Python][CI] Avoid using 'build/etc/localtime' timezone in hypothesis tests (#36391)
8fb4bf5ece is described below

commit 8fb4bf5eceab04e2ac5fcd2947783146ad15c340
Author: Joris Van den Bossche <jo...@gmail.com>
AuthorDate: Fri Jun 30 11:56:52 2023 +0200

    GH-36349: [Python][CI] Avoid using 'build/etc/localtime' timezone in hypothesis tests (#36391)
    
    ### What changes are included in this PR?
    
    Skip the test if the timezone is `zoneinfo.ZoneInfo(key='build/etc/localtime')`, because we don't support roundtripping such a timezone
    
    * Closes: #36349
    
    Authored-by: Joris Van den Bossche <jo...@gmail.com>
    Signed-off-by: Raúl Cumplido <ra...@gmail.com>
---
 python/pyarrow/tests/test_pandas.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/python/pyarrow/tests/test_pandas.py b/python/pyarrow/tests/test_pandas.py
index f1eb824df5..478cd4ff9c 100644
--- a/python/pyarrow/tests/test_pandas.py
+++ b/python/pyarrow/tests/test_pandas.py
@@ -1069,6 +1069,8 @@ class TestConvertDateTimeLikeTypes:
     @h.given(st.none() | past.timezones)
     @h.settings(deadline=None)
     def test_python_datetime_with_pytz_timezone(self, tz):
+        if str(tz) == "build/etc/localtime":
+            pytest.skip("Localtime timezone not supported")
         values = [datetime(2018, 1, 1, 12, 23, 45, tzinfo=tz)]
         df = pd.DataFrame({'datetime': values})
         _check_pandas_roundtrip(df, check_dtype=False)