-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_repr_multiindex*
and test_array_repr_dtypes_unix
tests failing on 32-bit platforms
#9127
Comments
I see some of those tests are skipped on windows; possibly we should also check for whether the platform is 32 bit and skip on those? |
Either that, or adjusting expected sizes depending on the platform. |
These are looking at the reprs, so adjusting the expectations isn't easy. We would def take a PR to skip them based on the platform though! |
Does skipping based on the value of |
That seems to be the recommended way |
we can also try hard-coding the dtype for those variables. Since the difference is in the |
Actually, fixing expectations doesn't seem that hard, so I'm going to try doing that first. If you don't like that, we can look into other solutions. |
Adjust the expectations in repr tests to account for different object sizes and numpy type representations across platforms, particularly fixing the tests on 32-bit platforms. Firstly, this involves getting the object type size from NumPy and using it to adjust the expectations in DataArray and Dataset tests. The tests were already using int64 type consistently, so only the sizes used for Python objects needed to be adjusted. Secondly, this involves fixing `test_array_repr_dtypes_unix`. The test specifically focuses on testing a 32-bit, 64-bit and "native" data type, which affect both size and actual representation (NumPy skips the dtype attribute for the native data type). Get the expected size from NumPy for the native int type, and reuse `repr()` from NumPy for all array types.
* adjust repr tests to account for different platforms (#9127) Adjust the expectations in repr tests to account for different object sizes and numpy type representations across platforms, particularly fixing the tests on 32-bit platforms. Firstly, this involves getting the object type size from NumPy and using it to adjust the expectations in DataArray and Dataset tests. The tests were already using int64 type consistently, so only the sizes used for Python objects needed to be adjusted. Secondly, this involves fixing `test_array_repr_dtypes_unix`. The test specifically focuses on testing a 32-bit, 64-bit and "native" data type, which affect both size and actual representation (NumPy skips the dtype attribute for the native data type). Get the expected size from NumPy for the native int type, and reuse `repr()` from NumPy for all array types. * Try combining Unix and Windows dtype repr tests
* main: Split out distributed writes in zarr docs (pydata#9132) Update zendoo badge link (pydata#9133) Support duplicate dimensions in `.chunk` (pydata#9099) Bump the actions group with 2 updates (pydata#9130) adjust repr tests to account for different platforms (pydata#9127) (pydata#9128)
* main: (48 commits) Add test for #9155 (#9161) Remove mypy exclusions for a couple more libraries (#9160) Include numbagg in type checks (#9159) Improve zarr chunks docs (#9140) groupby: remove some internal use of IndexVariable (#9123) Improve `to_zarr` docs (#9139) Split out distributed writes in zarr docs (#9132) Update zendoo badge link (#9133) Support duplicate dimensions in `.chunk` (#9099) Bump the actions group with 2 updates (#9130) adjust repr tests to account for different platforms (#9127) (#9128) Grouper refactor (#9122) Update docstring in api.py for open_mfdataset(), clarifying "chunks" argument (#9121) Add test for rechunking to a size string (#9117) Move Sphinx directives out of `See also` (#8466) new whats-new section (#9115) release v2024.06.0 (#9113) release notes for 2024.06.0 (#9092) [skip-ci] Try fixing hypothesis CI trigger (#9112) Undo custom padding-top. (#9107) ...
What happened?
When running the test suite on 32-bit platforms (e.g. x86), I'm getting the following test failures:
(log below)
I think the tests assume specific object sizes for 64-bit platforms.
This is Python 3.11.9 on 32-bit x86, retested on 380979f.
What did you expect to happen?
Tests passing.
Minimal Complete Verifiable Example
MVCE confirmation
Relevant log output
Anything else we need to know?
No response
Environment
INSTALLED VERSIONS
commit: 380979f
python: 3.11.9 (main, May 6 2024, 20:29:08) [GCC 13.2.1 20240210]
python-bits: 32
OS: Linux
OS-release: 6.9.4-gentoo-dist
machine: x86_64
processor: AMD Ryzen 5 3600 6-Core Processor
byteorder: little
LC_ALL: None
LANG: C.UTF8
LOCALE: ('en_US', 'UTF-8')
libhdf5: None
libnetcdf: None
xarray: 2024.6.0
pandas: 2.2.2
numpy: 1.26.4
scipy: 1.13.1
netCDF4: None
pydap: None
h5netcdf: None
h5py: None
zarr: None
cftime: 1.6.4
nc_time_axis: None
iris: None
bottleneck: 1.4.0rc5
dask: None
distributed: None
matplotlib: 3.9.0
cartopy: None
seaborn: None
numbagg: None
fsspec: None
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 69.5.1
pip: None
conda: None
pytest: 8.2.2
mypy: None
IPython: None
sphinx: None
The text was updated successfully, but these errors were encountered: