[Backport staging-26.05] python3Packages.pyarrow: use pure tzdata in tests (#553405)

This commit is contained in:
Dmitry Kalinkin
2026-08-17 21:28:17 +00:00
committed by GitHub

View File

@@ -19,6 +19,7 @@
setuptools,
setuptools-scm,
oldest-supported-numpy,
tzdata,
}:
let
@@ -116,8 +117,6 @@ buildPythonPackage rec {
"pyarrow/tests/test_csv.py::TestThreadedCSVTableRead::test_cancellation"
# expects arrow-cpp headers to be bundled.
"pyarrow/tests/test_cpp_internals.py::test_pyarrow_include"
# Searches for TZDATA in /usr.
"pyarrow/tests/test_orc.py::test_example_using_json"
# AssertionError: assert 'Europe/Monaco' == 'Europe/Paris'
"pyarrow/tests/test_types.py::test_dateutil_tzinfo_to_string"
# These fail with xxx_fixture not found.
@@ -163,6 +162,13 @@ buildPythonPackage rec {
disabledTests = [ "GcsFileSystem" ];
preCheck = ''
# Prepare r/w zoneinfo that test_orc can then copy and modify.
export TZDIR="$TMPDIR/zoneinfo"
cp -R "${tzdata}/${python.sitePackages}/tzdata/zoneinfo" "$TZDIR"
chmod -R u+w "$TZDIR"
substituteInPlace pyarrow/tests/test_orc.py \
--replace-fail "Path('/usr/share/zoneinfo')" "Path('$TZDIR')"
export PARQUET_TEST_DATA="${arrow-cpp.env.PARQUET_TEST_DATA}"
shopt -s extglob
rm -r pyarrow/!(conftest.py|tests)