From 99b35aff14dbe95da9d67c002c2fdadc0be88c4a Mon Sep 17 00:00:00 2001 From: Dane Pitkin Date: Wed, 2 Aug 2023 15:50:21 -0400 Subject: [PATCH] GH-36991: [Python] Skip tests on Win that require a tz database --- python/pyarrow/tests/test_convert_builtin.py | 4 ++++ python/pyarrow/tests/test_scalars.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/python/pyarrow/tests/test_convert_builtin.py b/python/pyarrow/tests/test_convert_builtin.py index cf2535a3c62d1..49c4f1a6e79d6 100644 --- a/python/pyarrow/tests/test_convert_builtin.py +++ b/python/pyarrow/tests/test_convert_builtin.py @@ -21,6 +21,7 @@ import itertools import math import re +import sys import hypothesis as h import numpy as np @@ -28,6 +29,7 @@ from pyarrow.pandas_compat import _pandas_api # noqa import pyarrow as pa +from pyarrow.tests import util import pyarrow.tests.strategies as past @@ -1338,6 +1340,8 @@ def test_sequence_timestamp_nanoseconds(): @pytest.mark.pandas +@pytest.mark.skipif(sys.platform == "win32" and not util.windows_has_tzdata(), + reason="Timezone database is not installed on Windows") def test_sequence_timestamp_from_int_with_unit(): # TODO(wesm): This test might be rewritten to assert the actual behavior # when pandas is not installed diff --git a/python/pyarrow/tests/test_scalars.py b/python/pyarrow/tests/test_scalars.py index a989301fe5735..d52edce6d91a8 100644 --- a/python/pyarrow/tests/test_scalars.py +++ b/python/pyarrow/tests/test_scalars.py @@ -154,6 +154,8 @@ def test_hashing_struct_scalar(): assert hash1 == hash2 +@pytest.mark.skipif(sys.platform == "win32" and not util.windows_has_tzdata(), + reason="Timezone database is not installed on Windows") def test_timestamp_scalar(): a = repr(pa.scalar("0000-01-01").cast(pa.timestamp("s"))) assert a == ""