Source: python-h5netcdf Version: 1.4.0-1 Severity: normal Control: forwarded -1 https://github.com/h5netcdf/h5netcdf/issues/243
The complex tests in h5netcdf 1.4.0 are failing on 32-bit systems. Test logs at https://ci.debian.net/data/autopkgtest/unstable/armel/p/python-h5netcdf/54210152/log.gz (also, armhf, i386) 79s ______________________ test_complex_type_creation_errors _______________________ 79s 79s tmp_local_netcdf = '/tmp/pytest-of-debci/pytest-0/test_complex_type_creation_err0/testfile.nc' 79s 79s @pytest.mark.skipif( 79s version.parse(netCDF4.__version__) < version.parse("1.7.0"), 79s reason="does not work before netCDF4 v1.7.0", 79s ) 79s def test_complex_type_creation_errors(tmp_local_netcdf): 79s complex_array = np.array([0 + 0j, 1 + 0j, 0 + 1j, 1 + 1j, 0.25 + 0.75j]) 79s 79s with legacyapi.Dataset(tmp_local_netcdf, "w") as ds: 79s ds.createDimension("x", size=len(complex_array)) 79s with pytest.raises(TypeError, match="data type 'c4' not understood"): 79s ds.createVariable("data", "c4", ("x",)) 79s 79s with legacyapi.Dataset(tmp_local_netcdf, "w") as ds: 79s ds.createDimension("x", size=len(complex_array)) 79s with pytest.raises( 79s TypeError, 79s match="Currently only 'complex64' and 'complex128' dtypes are allowed.", 79s ): 79s > ds.createVariable("data", "c32", ("x",)) 79s 79s tests/test_h5netcdf.py:2713: 79s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 79s /usr/lib/python3/dist-packages/h5netcdf/legacyapi.py:245: in createVariable 79s return super().create_variable( 79s /usr/lib/python3/dist-packages/h5netcdf/core.py:1234: in create_variable 79s return group._create_child_variable( 79s /usr/lib/python3/dist-packages/h5netcdf/core.py:1040: in _create_child_variable 79s dtype = _check_dtype(self, dtype) 79s /usr/lib/python3/dist-packages/h5netcdf/core.py:702: in _check_dtype 79s group._root._check_valid_netcdf_dtype(dtype) 79s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 79s 79s self = <Closed h5netcdf.legacyapi.Dataset>, dtype = 'c32' 79s 79s def _check_valid_netcdf_dtype(self, dtype): 79s > dtype = np.dtype(dtype) 79s E TypeError: data type 'c32' not understood 79s 79s /usr/lib/python3/dist-packages/h5netcdf/core.py:1604: TypeError 79s 79s During handling of the above exception, another exception occurred: 79s 79s tmp_local_netcdf = '/tmp/pytest-of-debci/pytest-0/test_complex_type_creation_err0/testfile.nc' 79s 79s @pytest.mark.skipif( 79s version.parse(netCDF4.__version__) < version.parse("1.7.0"), 79s reason="does not work before netCDF4 v1.7.0", 79s ) 79s def test_complex_type_creation_errors(tmp_local_netcdf): 79s complex_array = np.array([0 + 0j, 1 + 0j, 0 + 1j, 1 + 1j, 0.25 + 0.75j]) 79s 79s with legacyapi.Dataset(tmp_local_netcdf, "w") as ds: 79s ds.createDimension("x", size=len(complex_array)) 79s with pytest.raises(TypeError, match="data type 'c4' not understood"): 79s ds.createVariable("data", "c4", ("x",)) 79s 79s with legacyapi.Dataset(tmp_local_netcdf, "w") as ds: 79s ds.createDimension("x", size=len(complex_array)) 79s > with pytest.raises( 79s TypeError, 79s match="Currently only 'complex64' and 'complex128' dtypes are allowed.", 79s ): 79s E AssertionError: Regex pattern did not match. 79s E Regex: "Currently only 'complex64' and 'complex128' dtypes are allowed." 79s E Input: "data type 'c32' not understood" 79s 79s tests/test_h5netcdf.py:2709: AssertionError 79s =========================== short test summary info ============================ 79s FAILED tests/test_h5netcdf.py::test_complex_type_creation_errors - AssertionE... 79s ============ 1 failed, 99 passed, 51 skipped, 1 deselected in 6.28s ============