Skip to content

Commit

Permalink
apacheGH-36991: [Python] Skip tests on Win that require a tz database
Browse files Browse the repository at this point in the history
  • Loading branch information
danepitkin committed Aug 2, 2023
1 parent 836aa1e commit 99b35af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/pyarrow/tests/test_convert_builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@
import itertools
import math
import re
import sys

import hypothesis as h
import numpy as np
import pytest

from pyarrow.pandas_compat import _pandas_api # noqa
import pyarrow as pa
from pyarrow.tests import util
import pyarrow.tests.strategies as past


Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions python/pyarrow/tests/test_scalars.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "<pyarrow.TimestampScalar: '0000-01-01T00:00:00'>"
Expand Down

0 comments on commit 99b35af

Please sign in to comment.