From 375f3d92c32e0bee245f04682a6218b82dfa5e45 Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Fri, 7 Jul 2023 14:31:59 +0200 Subject: [PATCH] GH-36498: [Python][CI] Hypothesis nightly test fails with pytz.exceptions.UnknownTimeZoneError: 'Factory' (#36508) ### What changes are included in this PR? Skip the test if the timezone is `zoneinfo.ZoneInfo(key='Factory')`, because we don't support roundtripping such a timezone. * Closes: #36498 Authored-by: AlenkaF Signed-off-by: Joris Van den Bossche --- python/pyarrow/tests/test_pandas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyarrow/tests/test_pandas.py b/python/pyarrow/tests/test_pandas.py index 9123f7512137a..d6ff52d3e0df1 100644 --- a/python/pyarrow/tests/test_pandas.py +++ b/python/pyarrow/tests/test_pandas.py @@ -1070,7 +1070,7 @@ def test_python_datetime_with_pytz_tzinfo(self): @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": + if str(tz) in ["build/etc/localtime", "Factory"]: pytest.skip("Localtime timezone not supported") values = [datetime(2018, 1, 1, 12, 23, 45, tzinfo=tz)] df = pd.DataFrame({'datetime': values})