mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-26 02:05:02 +00:00
python3Packages.pyarrow: use pure tzdata in tests (#553144)
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
scikit-build-core,
|
||||
setuptools,
|
||||
setuptools-scm,
|
||||
tzdata,
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -121,8 +122,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.
|
||||
@@ -168,6 +167,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)
|
||||
|
||||
Reference in New Issue
Block a user