We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Apart from Test warnings noted here, we face plain test failures, that prevent packaging pandas for ix86 systems with Python 3.8.2 at least:
[ 1167s] =================================== FAILURES =================================== [ 1167s] ______________ test_maybe_promote_int_with_int[int8-32768-int32] _______________ [ 1167s] [gw7] linux -- Python 3.8.2 /usr/bin/python3 [ 1167s] [ 1167s] dtype = dtype('int8'), fill_value = 32768, expected_dtype = dtype('int32') [ 1167s] [ 1167s] @pytest.mark.parametrize( [ 1167s] "dtype, fill_value, expected_dtype", [ 1167s] [ [ 1167s] # size 8 [ 1167s] ("int8", 1, "int8"), [ 1167s] ("int8", np.iinfo("int8").max + 1, "int16"), [ 1167s] ("int8", np.iinfo("int16").max + 1, "int32"), [ 1167s] ("int8", np.iinfo("int32").max + 1, "int64"), [ 1167s] ("int8", np.iinfo("int64").max + 1, "object"), [ 1167s] ("int8", -1, "int8"), [ 1167s] ("int8", np.iinfo("int8").min - 1, "int16"), [ 1167s] ("int8", np.iinfo("int16").min - 1, "int32"), [ 1167s] ("int8", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("int8", np.iinfo("int64").min - 1, "object"), [ 1167s] # keep signed-ness as long as possible [ 1167s] ("uint8", 1, "uint8"), [ 1167s] ("uint8", np.iinfo("int8").max + 1, "uint8"), [ 1167s] ("uint8", np.iinfo("uint8").max + 1, "uint16"), [ 1167s] ("uint8", np.iinfo("int16").max + 1, "uint16"), [ 1167s] ("uint8", np.iinfo("uint16").max + 1, "uint32"), [ 1167s] ("uint8", np.iinfo("int32").max + 1, "uint32"), [ 1167s] ("uint8", np.iinfo("uint32").max + 1, "uint64"), [ 1167s] ("uint8", np.iinfo("int64").max + 1, "uint64"), [ 1167s] ("uint8", np.iinfo("uint64").max + 1, "object"), [ 1167s] # max of uint8 cannot be contained in int8 [ 1167s] ("uint8", -1, "int16"), [ 1167s] ("uint8", np.iinfo("int8").min - 1, "int16"), [ 1167s] ("uint8", np.iinfo("int16").min - 1, "int32"), [ 1167s] ("uint8", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("uint8", np.iinfo("int64").min - 1, "object"), [ 1167s] # size 16 [ 1167s] ("int16", 1, "int16"), [ 1167s] ("int16", np.iinfo("int8").max + 1, "int16"), [ 1167s] ("int16", np.iinfo("int16").max + 1, "int32"), [ 1167s] ("int16", np.iinfo("int32").max + 1, "int64"), [ 1167s] ("int16", np.iinfo("int64").max + 1, "object"), [ 1167s] ("int16", -1, "int16"), [ 1167s] ("int16", np.iinfo("int8").min - 1, "int16"), [ 1167s] ("int16", np.iinfo("int16").min - 1, "int32"), [ 1167s] ("int16", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("int16", np.iinfo("int64").min - 1, "object"), [ 1167s] ("uint16", 1, "uint16"), [ 1167s] ("uint16", np.iinfo("int8").max + 1, "uint16"), [ 1167s] ("uint16", np.iinfo("uint8").max + 1, "uint16"), [ 1167s] ("uint16", np.iinfo("int16").max + 1, "uint16"), [ 1167s] ("uint16", np.iinfo("uint16").max + 1, "uint32"), [ 1167s] ("uint16", np.iinfo("int32").max + 1, "uint32"), [ 1167s] ("uint16", np.iinfo("uint32").max + 1, "uint64"), [ 1167s] ("uint16", np.iinfo("int64").max + 1, "uint64"), [ 1167s] ("uint16", np.iinfo("uint64").max + 1, "object"), [ 1167s] ("uint16", -1, "int32"), [ 1167s] ("uint16", np.iinfo("int8").min - 1, "int32"), [ 1167s] ("uint16", np.iinfo("int16").min - 1, "int32"), [ 1167s] ("uint16", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("uint16", np.iinfo("int64").min - 1, "object"), [ 1167s] # size 32 [ 1167s] ("int32", 1, "int32"), [ 1167s] ("int32", np.iinfo("int8").max + 1, "int32"), [ 1167s] ("int32", np.iinfo("int16").max + 1, "int32"), [ 1167s] ("int32", np.iinfo("int32").max + 1, "int64"), [ 1167s] ("int32", np.iinfo("int64").max + 1, "object"), [ 1167s] ("int32", -1, "int32"), [ 1167s] ("int32", np.iinfo("int8").min - 1, "int32"), [ 1167s] ("int32", np.iinfo("int16").min - 1, "int32"), [ 1167s] ("int32", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("int32", np.iinfo("int64").min - 1, "object"), [ 1167s] ("uint32", 1, "uint32"), [ 1167s] ("uint32", np.iinfo("int8").max + 1, "uint32"), [ 1167s] ("uint32", np.iinfo("uint8").max + 1, "uint32"), [ 1167s] ("uint32", np.iinfo("int16").max + 1, "uint32"), [ 1167s] ("uint32", np.iinfo("uint16").max + 1, "uint32"), [ 1167s] ("uint32", np.iinfo("int32").max + 1, "uint32"), [ 1167s] ("uint32", np.iinfo("uint32").max + 1, "uint64"), [ 1167s] ("uint32", np.iinfo("int64").max + 1, "uint64"), [ 1167s] ("uint32", np.iinfo("uint64").max + 1, "object"), [ 1167s] ("uint32", -1, "int64"), [ 1167s] ("uint32", np.iinfo("int8").min - 1, "int64"), [ 1167s] ("uint32", np.iinfo("int16").min - 1, "int64"), [ 1167s] ("uint32", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("uint32", np.iinfo("int64").min - 1, "object"), [ 1167s] # size 64 [ 1167s] ("int64", 1, "int64"), [ 1167s] ("int64", np.iinfo("int8").max + 1, "int64"), [ 1167s] ("int64", np.iinfo("int16").max + 1, "int64"), [ 1167s] ("int64", np.iinfo("int32").max + 1, "int64"), [ 1167s] ("int64", np.iinfo("int64").max + 1, "object"), [ 1167s] ("int64", -1, "int64"), [ 1167s] ("int64", np.iinfo("int8").min - 1, "int64"), [ 1167s] ("int64", np.iinfo("int16").min - 1, "int64"), [ 1167s] ("int64", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("int64", np.iinfo("int64").min - 1, "object"), [ 1167s] ("uint64", 1, "uint64"), [ 1167s] ("uint64", np.iinfo("int8").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("uint8").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("int16").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("uint16").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("int32").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("uint32").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("int64").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("uint64").max + 1, "object"), [ 1167s] ("uint64", -1, "object"), [ 1167s] ("uint64", np.iinfo("int8").min - 1, "object"), [ 1167s] ("uint64", np.iinfo("int16").min - 1, "object"), [ 1167s] ("uint64", np.iinfo("int32").min - 1, "object"), [ 1167s] ("uint64", np.iinfo("int64").min - 1, "object"), [ 1167s] ], [ 1167s] ) [ 1167s] def test_maybe_promote_int_with_int(dtype, fill_value, expected_dtype): [ 1167s] dtype = np.dtype(dtype) [ 1167s] expected_dtype = np.dtype(expected_dtype) [ 1167s] [ 1167s] # output is not a generic int, but corresponds to expected_dtype [ 1167s] exp_val_for_scalar = np.array([fill_value], dtype=expected_dtype)[0] [ 1167s] [ 1167s] > _check_promote(dtype, fill_value, expected_dtype, exp_val_for_scalar) [ 1167s] [ 1167s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:237: [ 1167s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 1167s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:94: in _check_promote [ 1167s] _assert_match(result_fill_value, expected_fill_value) [ 1167s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 1167s] [ 1167s] result_fill_value = 32768, expected_fill_value = 32768 [ 1167s] [ 1167s] def _assert_match(result_fill_value, expected_fill_value): [ 1167s] # GH#23982/25425 require the same type in addition to equality/NA-ness [ 1167s] res_type = type(result_fill_value) [ 1167s] ex_type = type(expected_fill_value) [ 1167s] if res_type.__name__ == "uint64": [ 1167s] # No idea why, but these (sometimes) do not compare as equal [ 1167s] assert ex_type.__name__ == "uint64" [ 1167s] elif res_type.__name__ == "ulonglong": [ 1167s] # On some builds we get this instead of np.uint64 [ 1167s] # Note: cant check res_type.dtype.itemsize directly on numpy 1.18 [ 1167s] assert res_type(0).itemsize == 8 [ 1167s] assert ex_type == res_type or ex_type == np.uint64 [ 1167s] else: [ 1167s] # On some builds, type comparison fails, e.g. np.int32 != np.int32 [ 1167s] > assert res_type == ex_type or res_type.__name__ == ex_type.__name__ [ 1167s] E AssertionError: assert (<class 'numpy.intc'> == <class 'numpy.int32'> [ 1167s] E -<class 'numpy.intc'> [ 1167s] E +<class 'numpy.int32'> or 'intc' == 'int32' [ 1167s] E - intc [ 1167s] E + int32) [ 1167s] [ 1167s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:111: AssertionError [ 1167s] _____________ test_maybe_promote_int_with_int[uint8-65536-uint32] ______________ [ 1167s] [gw7] linux -- Python 3.8.2 /usr/bin/python3 [ 1167s] [ 1167s] dtype = dtype('uint8'), fill_value = 65536, expected_dtype = dtype('uint32') [ 1167s] [ 1167s] @pytest.mark.parametrize( [ 1167s] "dtype, fill_value, expected_dtype", [ 1167s] [ [ 1167s] # size 8 [ 1167s] ("int8", 1, "int8"), [ 1167s] ("int8", np.iinfo("int8").max + 1, "int16"), [ 1167s] ("int8", np.iinfo("int16").max + 1, "int32"), [ 1167s] ("int8", np.iinfo("int32").max + 1, "int64"), [ 1167s] ("int8", np.iinfo("int64").max + 1, "object"), [ 1167s] ("int8", -1, "int8"), [ 1167s] ("int8", np.iinfo("int8").min - 1, "int16"), [ 1167s] ("int8", np.iinfo("int16").min - 1, "int32"), [ 1167s] ("int8", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("int8", np.iinfo("int64").min - 1, "object"), [ 1167s] # keep signed-ness as long as possible [ 1167s] ("uint8", 1, "uint8"), [ 1167s] ("uint8", np.iinfo("int8").max + 1, "uint8"), [ 1167s] ("uint8", np.iinfo("uint8").max + 1, "uint16"), [ 1167s] ("uint8", np.iinfo("int16").max + 1, "uint16"), [ 1167s] ("uint8", np.iinfo("uint16").max + 1, "uint32"), [ 1167s] ("uint8", np.iinfo("int32").max + 1, "uint32"), [ 1167s] ("uint8", np.iinfo("uint32").max + 1, "uint64"), [ 1167s] ("uint8", np.iinfo("int64").max + 1, "uint64"), [ 1167s] ("uint8", np.iinfo("uint64").max + 1, "object"), [ 1167s] # max of uint8 cannot be contained in int8 [ 1167s] ("uint8", -1, "int16"), [ 1167s] ("uint8", np.iinfo("int8").min - 1, "int16"), [ 1167s] ("uint8", np.iinfo("int16").min - 1, "int32"), [ 1167s] ("uint8", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("uint8", np.iinfo("int64").min - 1, "object"), [ 1167s] # size 16 [ 1167s] ("int16", 1, "int16"), [ 1167s] ("int16", np.iinfo("int8").max + 1, "int16"), [ 1167s] ("int16", np.iinfo("int16").max + 1, "int32"), [ 1167s] ("int16", np.iinfo("int32").max + 1, "int64"), [ 1167s] ("int16", np.iinfo("int64").max + 1, "object"), [ 1167s] ("int16", -1, "int16"), [ 1167s] ("int16", np.iinfo("int8").min - 1, "int16"), [ 1167s] ("int16", np.iinfo("int16").min - 1, "int32"), [ 1167s] ("int16", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("int16", np.iinfo("int64").min - 1, "object"), [ 1167s] ("uint16", 1, "uint16"), [ 1167s] ("uint16", np.iinfo("int8").max + 1, "uint16"), [ 1167s] ("uint16", np.iinfo("uint8").max + 1, "uint16"), [ 1167s] ("uint16", np.iinfo("int16").max + 1, "uint16"), [ 1167s] ("uint16", np.iinfo("uint16").max + 1, "uint32"), [ 1167s] ("uint16", np.iinfo("int32").max + 1, "uint32"), [ 1167s] ("uint16", np.iinfo("uint32").max + 1, "uint64"), [ 1167s] ("uint16", np.iinfo("int64").max + 1, "uint64"), [ 1167s] ("uint16", np.iinfo("uint64").max + 1, "object"), [ 1167s] ("uint16", -1, "int32"), [ 1167s] ("uint16", np.iinfo("int8").min - 1, "int32"), [ 1167s] ("uint16", np.iinfo("int16").min - 1, "int32"), [ 1167s] ("uint16", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("uint16", np.iinfo("int64").min - 1, "object"), [ 1167s] # size 32 [ 1167s] ("int32", 1, "int32"), [ 1167s] ("int32", np.iinfo("int8").max + 1, "int32"), [ 1167s] ("int32", np.iinfo("int16").max + 1, "int32"), [ 1167s] ("int32", np.iinfo("int32").max + 1, "int64"), [ 1167s] ("int32", np.iinfo("int64").max + 1, "object"), [ 1167s] ("int32", -1, "int32"), [ 1167s] ("int32", np.iinfo("int8").min - 1, "int32"), [ 1167s] ("int32", np.iinfo("int16").min - 1, "int32"), [ 1167s] ("int32", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("int32", np.iinfo("int64").min - 1, "object"), [ 1167s] ("uint32", 1, "uint32"), [ 1167s] ("uint32", np.iinfo("int8").max + 1, "uint32"), [ 1167s] ("uint32", np.iinfo("uint8").max + 1, "uint32"), [ 1167s] ("uint32", np.iinfo("int16").max + 1, "uint32"), [ 1167s] ("uint32", np.iinfo("uint16").max + 1, "uint32"), [ 1167s] ("uint32", np.iinfo("int32").max + 1, "uint32"), [ 1167s] ("uint32", np.iinfo("uint32").max + 1, "uint64"), [ 1167s] ("uint32", np.iinfo("int64").max + 1, "uint64"), [ 1167s] ("uint32", np.iinfo("uint64").max + 1, "object"), [ 1167s] ("uint32", -1, "int64"), [ 1167s] ("uint32", np.iinfo("int8").min - 1, "int64"), [ 1167s] ("uint32", np.iinfo("int16").min - 1, "int64"), [ 1167s] ("uint32", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("uint32", np.iinfo("int64").min - 1, "object"), [ 1167s] # size 64 [ 1167s] ("int64", 1, "int64"), [ 1167s] ("int64", np.iinfo("int8").max + 1, "int64"), [ 1167s] ("int64", np.iinfo("int16").max + 1, "int64"), [ 1167s] ("int64", np.iinfo("int32").max + 1, "int64"), [ 1167s] ("int64", np.iinfo("int64").max + 1, "object"), [ 1167s] ("int64", -1, "int64"), [ 1167s] ("int64", np.iinfo("int8").min - 1, "int64"), [ 1167s] ("int64", np.iinfo("int16").min - 1, "int64"), [ 1167s] ("int64", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("int64", np.iinfo("int64").min - 1, "object"), [ 1167s] ("uint64", 1, "uint64"), [ 1167s] ("uint64", np.iinfo("int8").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("uint8").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("int16").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("uint16").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("int32").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("uint32").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("int64").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("uint64").max + 1, "object"), [ 1167s] ("uint64", -1, "object"), [ 1167s] ("uint64", np.iinfo("int8").min - 1, "object"), [ 1167s] ("uint64", np.iinfo("int16").min - 1, "object"), [ 1167s] ("uint64", np.iinfo("int32").min - 1, "object"), [ 1167s] ("uint64", np.iinfo("int64").min - 1, "object"), [ 1167s] ], [ 1167s] ) [ 1167s] def test_maybe_promote_int_with_int(dtype, fill_value, expected_dtype): [ 1167s] dtype = np.dtype(dtype) [ 1167s] expected_dtype = np.dtype(expected_dtype) [ 1167s] [ 1167s] # output is not a generic int, but corresponds to expected_dtype [ 1167s] exp_val_for_scalar = np.array([fill_value], dtype=expected_dtype)[0] [ 1167s] [ 1167s] > _check_promote(dtype, fill_value, expected_dtype, exp_val_for_scalar) [ 1167s] [ 1167s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:237: [ 1167s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 1167s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:94: in _check_promote [ 1167s] _assert_match(result_fill_value, expected_fill_value) [ 1167s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 1167s] [ 1167s] result_fill_value = 65536, expected_fill_value = 65536 [ 1167s] [ 1167s] def _assert_match(result_fill_value, expected_fill_value): [ 1167s] # GH#23982/25425 require the same type in addition to equality/NA-ness [ 1167s] res_type = type(result_fill_value) [ 1167s] ex_type = type(expected_fill_value) [ 1167s] if res_type.__name__ == "uint64": [ 1167s] # No idea why, but these (sometimes) do not compare as equal [ 1167s] assert ex_type.__name__ == "uint64" [ 1167s] elif res_type.__name__ == "ulonglong": [ 1167s] # On some builds we get this instead of np.uint64 [ 1167s] # Note: cant check res_type.dtype.itemsize directly on numpy 1.18 [ 1167s] assert res_type(0).itemsize == 8 [ 1167s] assert ex_type == res_type or ex_type == np.uint64 [ 1167s] else: [ 1167s] # On some builds, type comparison fails, e.g. np.int32 != np.int32 [ 1167s] > assert res_type == ex_type or res_type.__name__ == ex_type.__name__ [ 1167s] E AssertionError: assert (<class 'numpy.uintc'> == <class 'numpy.uint32'> [ 1167s] E -<class 'numpy.uintc'> [ 1167s] E +<class 'numpy.uint32'> or 'uintc' == 'uint32' [ 1167s] E - uintc [ 1167s] E + uint32) [ 1167s] [ 1167s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:111: AssertionError [ 1167s] ___________ test_maybe_promote_int_with_int[uint8-2147483648-uint32] ___________ [ 1167s] [gw7] linux -- Python 3.8.2 /usr/bin/python3 [ 1167s] [ 1167s] dtype = dtype('uint8'), fill_value = 2147483648 [ 1167s] expected_dtype = dtype('uint32') [ 1167s] [ 1167s] @pytest.mark.parametrize( [ 1167s] "dtype, fill_value, expected_dtype", [ 1167s] [ [ 1167s] # size 8 [ 1167s] ("int8", 1, "int8"), [ 1167s] ("int8", np.iinfo("int8").max + 1, "int16"), [ 1167s] ("int8", np.iinfo("int16").max + 1, "int32"), [ 1167s] ("int8", np.iinfo("int32").max + 1, "int64"), [ 1167s] ("int8", np.iinfo("int64").max + 1, "object"), [ 1167s] ("int8", -1, "int8"), [ 1167s] ("int8", np.iinfo("int8").min - 1, "int16"), [ 1167s] ("int8", np.iinfo("int16").min - 1, "int32"), [ 1167s] ("int8", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("int8", np.iinfo("int64").min - 1, "object"), [ 1167s] # keep signed-ness as long as possible [ 1167s] ("uint8", 1, "uint8"), [ 1167s] ("uint8", np.iinfo("int8").max + 1, "uint8"), [ 1167s] ("uint8", np.iinfo("uint8").max + 1, "uint16"), [ 1167s] ("uint8", np.iinfo("int16").max + 1, "uint16"), [ 1167s] ("uint8", np.iinfo("uint16").max + 1, "uint32"), [ 1167s] ("uint8", np.iinfo("int32").max + 1, "uint32"), [ 1167s] ("uint8", np.iinfo("uint32").max + 1, "uint64"), [ 1167s] ("uint8", np.iinfo("int64").max + 1, "uint64"), [ 1167s] ("uint8", np.iinfo("uint64").max + 1, "object"), [ 1167s] # max of uint8 cannot be contained in int8 [ 1167s] ("uint8", -1, "int16"), [ 1167s] ("uint8", np.iinfo("int8").min - 1, "int16"), [ 1167s] ("uint8", np.iinfo("int16").min - 1, "int32"), [ 1167s] ("uint8", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("uint8", np.iinfo("int64").min - 1, "object"), [ 1167s] # size 16 [ 1167s] ("int16", 1, "int16"), [ 1167s] ("int16", np.iinfo("int8").max + 1, "int16"), [ 1167s] ("int16", np.iinfo("int16").max + 1, "int32"), [ 1167s] ("int16", np.iinfo("int32").max + 1, "int64"), [ 1167s] ("int16", np.iinfo("int64").max + 1, "object"), [ 1167s] ("int16", -1, "int16"), [ 1167s] ("int16", np.iinfo("int8").min - 1, "int16"), [ 1167s] ("int16", np.iinfo("int16").min - 1, "int32"), [ 1167s] ("int16", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("int16", np.iinfo("int64").min - 1, "object"), [ 1167s] ("uint16", 1, "uint16"), [ 1167s] ("uint16", np.iinfo("int8").max + 1, "uint16"), [ 1167s] ("uint16", np.iinfo("uint8").max + 1, "uint16"), [ 1167s] ("uint16", np.iinfo("int16").max + 1, "uint16"), [ 1167s] ("uint16", np.iinfo("uint16").max + 1, "uint32"), [ 1167s] ("uint16", np.iinfo("int32").max + 1, "uint32"), [ 1167s] ("uint16", np.iinfo("uint32").max + 1, "uint64"), [ 1167s] ("uint16", np.iinfo("int64").max + 1, "uint64"), [ 1167s] ("uint16", np.iinfo("uint64").max + 1, "object"), [ 1167s] ("uint16", -1, "int32"), [ 1167s] ("uint16", np.iinfo("int8").min - 1, "int32"), [ 1167s] ("uint16", np.iinfo("int16").min - 1, "int32"), [ 1167s] ("uint16", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("uint16", np.iinfo("int64").min - 1, "object"), [ 1167s] # size 32 [ 1167s] ("int32", 1, "int32"), [ 1167s] ("int32", np.iinfo("int8").max + 1, "int32"), [ 1167s] ("int32", np.iinfo("int16").max + 1, "int32"), [ 1167s] ("int32", np.iinfo("int32").max + 1, "int64"), [ 1167s] ("int32", np.iinfo("int64").max + 1, "object"), [ 1167s] ("int32", -1, "int32"), [ 1167s] ("int32", np.iinfo("int8").min - 1, "int32"), [ 1167s] ("int32", np.iinfo("int16").min - 1, "int32"), [ 1167s] ("int32", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("int32", np.iinfo("int64").min - 1, "object"), [ 1167s] ("uint32", 1, "uint32"), [ 1167s] ("uint32", np.iinfo("int8").max + 1, "uint32"), [ 1167s] ("uint32", np.iinfo("uint8").max + 1, "uint32"), [ 1167s] ("uint32", np.iinfo("int16").max + 1, "uint32"), [ 1167s] ("uint32", np.iinfo("uint16").max + 1, "uint32"), [ 1167s] ("uint32", np.iinfo("int32").max + 1, "uint32"), [ 1167s] ("uint32", np.iinfo("uint32").max + 1, "uint64"), [ 1167s] ("uint32", np.iinfo("int64").max + 1, "uint64"), [ 1167s] ("uint32", np.iinfo("uint64").max + 1, "object"), [ 1167s] ("uint32", -1, "int64"), [ 1167s] ("uint32", np.iinfo("int8").min - 1, "int64"), [ 1167s] ("uint32", np.iinfo("int16").min - 1, "int64"), [ 1167s] ("uint32", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("uint32", np.iinfo("int64").min - 1, "object"), [ 1167s] # size 64 [ 1167s] ("int64", 1, "int64"), [ 1167s] ("int64", np.iinfo("int8").max + 1, "int64"), [ 1167s] ("int64", np.iinfo("int16").max + 1, "int64"), [ 1167s] ("int64", np.iinfo("int32").max + 1, "int64"), [ 1167s] ("int64", np.iinfo("int64").max + 1, "object"), [ 1167s] ("int64", -1, "int64"), [ 1167s] ("int64", np.iinfo("int8").min - 1, "int64"), [ 1167s] ("int64", np.iinfo("int16").min - 1, "int64"), [ 1167s] ("int64", np.iinfo("int32").min - 1, "int64"), [ 1167s] ("int64", np.iinfo("int64").min - 1, "object"), [ 1167s] ("uint64", 1, "uint64"), [ 1167s] ("uint64", np.iinfo("int8").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("uint8").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("int16").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("uint16").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("int32").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("uint32").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("int64").max + 1, "uint64"), [ 1167s] ("uint64", np.iinfo("uint64").max + 1, "object"), [ 1167s] ("uint64", -1, "object"), [ 1167s] ("uint64", np.iinfo("int8").min - 1, "object"), [ 1167s] ("uint64", np.iinfo("int16").min - 1, "object"), [ 1167s] ("uint64", np.iinfo("int32").min - 1, "object"), [ 1167s] ("uint64", np.iinfo("int64").min - 1, "object"), [ 1167s] ], [ 1167s] ) [ 1167s] def test_maybe_promote_int_with_int(dtype, fill_value, expected_dtype): [ 1167s] dtype = np.dtype(dtype) [ 1167s] expected_dtype = np.dtype(expected_dtype) [ 1167s] [ 1167s] # output is not a generic int, but corresponds to expected_dtype [ 1167s] exp_val_for_scalar = np.array([fill_value], dtype=expected_dtype)[0] [ 1167s] [ 1167s] > _check_promote(dtype, fill_value, expected_dtype, exp_val_for_scalar) [ 1167s] [ 1167s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:237: [ 1167s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 1167s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:94: in _check_promote [ 1167s] _assert_match(result_fill_value, expected_fill_value) [ 1167s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 1167s] [ 1167s] result_fill_value = 2147483648, expected_fill_value = 2147483648 [ 1167s] [ 1167s] def _assert_match(result_fill_value, expected_fill_value): [ 1167s] # GH#23982/25425 require the same type in addition to equality/NA-ness [ 1167s] res_type = type(result_fill_value) [ 1167s] ex_type = type(expected_fill_value) [ 1167s] if res_type.__name__ == "uint64": [ 1167s] # No idea why, but these (sometimes) do not compare as equal [ 1167s] assert ex_type.__name__ == "uint64" [ 1167s] elif res_type.__name__ == "ulonglong": [ 1167s] # On some builds we get this instead of np.uint64 [ 1167s] # Note: cant check res_type.dtype.itemsize directly on numpy 1.18 [ 1167s] assert res_type(0).itemsize == 8 [ 1167s] assert ex_type == res_type or ex_type == np.uint64 [ 1167s] else: [ 1167s] # On some builds, type comparison fails, e.g. np.int32 != np.int32 [ 1167s] > assert res_type == ex_type or res_type.__name__ == ex_type.__name__ [ 1167s] E AssertionError: assert (<class 'numpy.uintc'> == <class 'numpy.uint32'> [ 1167s] E -<class 'numpy.uintc'> [ 1167s] E +<class 'numpy.uint32'> or 'uintc' == 'uint32' [ 1167s] E - uintc [ 1167s] E + uint32) [ 1167s] [ 1167s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:111: AssertionError [ 1168s] ______________ test_maybe_promote_int_with_int[int16-32768-int32] ______________ [ 1168s] [gw7] linux -- Python 3.8.2 /usr/bin/python3 [ 1168s] [ 1168s] dtype = dtype('int16'), fill_value = 32768, expected_dtype = dtype('int32') [ 1168s] [ 1168s] @pytest.mark.parametrize( [ 1168s] "dtype, fill_value, expected_dtype", [ 1168s] [ [ 1168s] # size 8 [ 1168s] ("int8", 1, "int8"), [ 1168s] ("int8", np.iinfo("int8").max + 1, "int16"), [ 1168s] ("int8", np.iinfo("int16").max + 1, "int32"), [ 1168s] ("int8", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int8", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int8", -1, "int8"), [ 1168s] ("int8", np.iinfo("int8").min - 1, "int16"), [ 1168s] ("int8", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("int8", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int8", np.iinfo("int64").min - 1, "object"), [ 1168s] # keep signed-ness as long as possible [ 1168s] ("uint8", 1, "uint8"), [ 1168s] ("uint8", np.iinfo("int8").max + 1, "uint8"), [ 1168s] ("uint8", np.iinfo("uint8").max + 1, "uint16"), [ 1168s] ("uint8", np.iinfo("int16").max + 1, "uint16"), [ 1168s] ("uint8", np.iinfo("uint16").max + 1, "uint32"), [ 1168s] ("uint8", np.iinfo("int32").max + 1, "uint32"), [ 1168s] ("uint8", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint8", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint8", np.iinfo("uint64").max + 1, "object"), [ 1168s] # max of uint8 cannot be contained in int8 [ 1168s] ("uint8", -1, "int16"), [ 1168s] ("uint8", np.iinfo("int8").min - 1, "int16"), [ 1168s] ("uint8", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("uint8", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("uint8", np.iinfo("int64").min - 1, "object"), [ 1168s] # size 16 [ 1168s] ("int16", 1, "int16"), [ 1168s] ("int16", np.iinfo("int8").max + 1, "int16"), [ 1168s] ("int16", np.iinfo("int16").max + 1, "int32"), [ 1168s] ("int16", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int16", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int16", -1, "int16"), [ 1168s] ("int16", np.iinfo("int8").min - 1, "int16"), [ 1168s] ("int16", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("int16", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int16", np.iinfo("int64").min - 1, "object"), [ 1168s] ("uint16", 1, "uint16"), [ 1168s] ("uint16", np.iinfo("int8").max + 1, "uint16"), [ 1168s] ("uint16", np.iinfo("uint8").max + 1, "uint16"), [ 1168s] ("uint16", np.iinfo("int16").max + 1, "uint16"), [ 1168s] ("uint16", np.iinfo("uint16").max + 1, "uint32"), [ 1168s] ("uint16", np.iinfo("int32").max + 1, "uint32"), [ 1168s] ("uint16", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint16", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint16", np.iinfo("uint64").max + 1, "object"), [ 1168s] ("uint16", -1, "int32"), [ 1168s] ("uint16", np.iinfo("int8").min - 1, "int32"), [ 1168s] ("uint16", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("uint16", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("uint16", np.iinfo("int64").min - 1, "object"), [ 1168s] # size 32 [ 1168s] ("int32", 1, "int32"), [ 1168s] ("int32", np.iinfo("int8").max + 1, "int32"), [ 1168s] ("int32", np.iinfo("int16").max + 1, "int32"), [ 1168s] ("int32", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int32", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int32", -1, "int32"), [ 1168s] ("int32", np.iinfo("int8").min - 1, "int32"), [ 1168s] ("int32", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("int32", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int32", np.iinfo("int64").min - 1, "object"), [ 1168s] ("uint32", 1, "uint32"), [ 1168s] ("uint32", np.iinfo("int8").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("uint8").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("int16").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("uint16").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("int32").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint32", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint32", np.iinfo("uint64").max + 1, "object"), [ 1168s] ("uint32", -1, "int64"), [ 1168s] ("uint32", np.iinfo("int8").min - 1, "int64"), [ 1168s] ("uint32", np.iinfo("int16").min - 1, "int64"), [ 1168s] ("uint32", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("uint32", np.iinfo("int64").min - 1, "object"), [ 1168s] # size 64 [ 1168s] ("int64", 1, "int64"), [ 1168s] ("int64", np.iinfo("int8").max + 1, "int64"), [ 1168s] ("int64", np.iinfo("int16").max + 1, "int64"), [ 1168s] ("int64", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int64", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int64", -1, "int64"), [ 1168s] ("int64", np.iinfo("int8").min - 1, "int64"), [ 1168s] ("int64", np.iinfo("int16").min - 1, "int64"), [ 1168s] ("int64", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int64", np.iinfo("int64").min - 1, "object"), [ 1168s] ("uint64", 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int8").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint8").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int16").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint16").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int32").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint64").max + 1, "object"), [ 1168s] ("uint64", -1, "object"), [ 1168s] ("uint64", np.iinfo("int8").min - 1, "object"), [ 1168s] ("uint64", np.iinfo("int16").min - 1, "object"), [ 1168s] ("uint64", np.iinfo("int32").min - 1, "object"), [ 1168s] ("uint64", np.iinfo("int64").min - 1, "object"), [ 1168s] ], [ 1168s] ) [ 1168s] def test_maybe_promote_int_with_int(dtype, fill_value, expected_dtype): [ 1168s] dtype = np.dtype(dtype) [ 1168s] expected_dtype = np.dtype(expected_dtype) [ 1168s] [ 1168s] # output is not a generic int, but corresponds to expected_dtype [ 1168s] exp_val_for_scalar = np.array([fill_value], dtype=expected_dtype)[0] [ 1168s] [ 1168s] > _check_promote(dtype, fill_value, expected_dtype, exp_val_for_scalar) [ 1168s] [ 1168s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:237: [ 1168s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 1168s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:94: in _check_promote [ 1168s] _assert_match(result_fill_value, expected_fill_value) [ 1168s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 1168s] [ 1168s] result_fill_value = 32768, expected_fill_value = 32768 [ 1168s] [ 1168s] def _assert_match(result_fill_value, expected_fill_value): [ 1168s] # GH#23982/25425 require the same type in addition to equality/NA-ness [ 1168s] res_type = type(result_fill_value) [ 1168s] ex_type = type(expected_fill_value) [ 1168s] if res_type.__name__ == "uint64": [ 1168s] # No idea why, but these (sometimes) do not compare as equal [ 1168s] assert ex_type.__name__ == "uint64" [ 1168s] elif res_type.__name__ == "ulonglong": [ 1168s] # On some builds we get this instead of np.uint64 [ 1168s] # Note: cant check res_type.dtype.itemsize directly on numpy 1.18 [ 1168s] assert res_type(0).itemsize == 8 [ 1168s] assert ex_type == res_type or ex_type == np.uint64 [ 1168s] else: [ 1168s] # On some builds, type comparison fails, e.g. np.int32 != np.int32 [ 1168s] > assert res_type == ex_type or res_type.__name__ == ex_type.__name__ [ 1168s] E AssertionError: assert (<class 'numpy.intc'> == <class 'numpy.int32'> [ 1168s] E -<class 'numpy.intc'> [ 1168s] E +<class 'numpy.int32'> or 'intc' == 'int32' [ 1168s] E - intc [ 1168s] E + int32) [ 1168s] [ 1168s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:111: AssertionError [ 1168s] _____________ test_maybe_promote_int_with_int[uint16-65536-uint32] _____________ [ 1168s] [gw7] linux -- Python 3.8.2 /usr/bin/python3 [ 1168s] [ 1168s] dtype = dtype('uint16'), fill_value = 65536, expected_dtype = dtype('uint32') [ 1168s] [ 1168s] @pytest.mark.parametrize( [ 1168s] "dtype, fill_value, expected_dtype", [ 1168s] [ [ 1168s] # size 8 [ 1168s] ("int8", 1, "int8"), [ 1168s] ("int8", np.iinfo("int8").max + 1, "int16"), [ 1168s] ("int8", np.iinfo("int16").max + 1, "int32"), [ 1168s] ("int8", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int8", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int8", -1, "int8"), [ 1168s] ("int8", np.iinfo("int8").min - 1, "int16"), [ 1168s] ("int8", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("int8", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int8", np.iinfo("int64").min - 1, "object"), [ 1168s] # keep signed-ness as long as possible [ 1168s] ("uint8", 1, "uint8"), [ 1168s] ("uint8", np.iinfo("int8").max + 1, "uint8"), [ 1168s] ("uint8", np.iinfo("uint8").max + 1, "uint16"), [ 1168s] ("uint8", np.iinfo("int16").max + 1, "uint16"), [ 1168s] ("uint8", np.iinfo("uint16").max + 1, "uint32"), [ 1168s] ("uint8", np.iinfo("int32").max + 1, "uint32"), [ 1168s] ("uint8", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint8", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint8", np.iinfo("uint64").max + 1, "object"), [ 1168s] # max of uint8 cannot be contained in int8 [ 1168s] ("uint8", -1, "int16"), [ 1168s] ("uint8", np.iinfo("int8").min - 1, "int16"), [ 1168s] ("uint8", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("uint8", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("uint8", np.iinfo("int64").min - 1, "object"), [ 1168s] # size 16 [ 1168s] ("int16", 1, "int16"), [ 1168s] ("int16", np.iinfo("int8").max + 1, "int16"), [ 1168s] ("int16", np.iinfo("int16").max + 1, "int32"), [ 1168s] ("int16", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int16", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int16", -1, "int16"), [ 1168s] ("int16", np.iinfo("int8").min - 1, "int16"), [ 1168s] ("int16", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("int16", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int16", np.iinfo("int64").min - 1, "object"), [ 1168s] ("uint16", 1, "uint16"), [ 1168s] ("uint16", np.iinfo("int8").max + 1, "uint16"), [ 1168s] ("uint16", np.iinfo("uint8").max + 1, "uint16"), [ 1168s] ("uint16", np.iinfo("int16").max + 1, "uint16"), [ 1168s] ("uint16", np.iinfo("uint16").max + 1, "uint32"), [ 1168s] ("uint16", np.iinfo("int32").max + 1, "uint32"), [ 1168s] ("uint16", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint16", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint16", np.iinfo("uint64").max + 1, "object"), [ 1168s] ("uint16", -1, "int32"), [ 1168s] ("uint16", np.iinfo("int8").min - 1, "int32"), [ 1168s] ("uint16", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("uint16", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("uint16", np.iinfo("int64").min - 1, "object"), [ 1168s] # size 32 [ 1168s] ("int32", 1, "int32"), [ 1168s] ("int32", np.iinfo("int8").max + 1, "int32"), [ 1168s] ("int32", np.iinfo("int16").max + 1, "int32"), [ 1168s] ("int32", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int32", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int32", -1, "int32"), [ 1168s] ("int32", np.iinfo("int8").min - 1, "int32"), [ 1168s] ("int32", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("int32", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int32", np.iinfo("int64").min - 1, "object"), [ 1168s] ("uint32", 1, "uint32"), [ 1168s] ("uint32", np.iinfo("int8").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("uint8").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("int16").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("uint16").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("int32").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint32", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint32", np.iinfo("uint64").max + 1, "object"), [ 1168s] ("uint32", -1, "int64"), [ 1168s] ("uint32", np.iinfo("int8").min - 1, "int64"), [ 1168s] ("uint32", np.iinfo("int16").min - 1, "int64"), [ 1168s] ("uint32", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("uint32", np.iinfo("int64").min - 1, "object"), [ 1168s] # size 64 [ 1168s] ("int64", 1, "int64"), [ 1168s] ("int64", np.iinfo("int8").max + 1, "int64"), [ 1168s] ("int64", np.iinfo("int16").max + 1, "int64"), [ 1168s] ("int64", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int64", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int64", -1, "int64"), [ 1168s] ("int64", np.iinfo("int8").min - 1, "int64"), [ 1168s] ("int64", np.iinfo("int16").min - 1, "int64"), [ 1168s] ("int64", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int64", np.iinfo("int64").min - 1, "object"), [ 1168s] ("uint64", 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int8").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint8").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int16").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint16").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int32").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint64").max + 1, "object"), [ 1168s] ("uint64", -1, "object"), [ 1168s] ("uint64", np.iinfo("int8").min - 1, "object"), [ 1168s] ("uint64", np.iinfo("int16").min - 1, "object"), [ 1168s] ("uint64", np.iinfo("int32").min - 1, "object"), [ 1168s] ("uint64", np.iinfo("int64").min - 1, "object"), [ 1168s] ], [ 1168s] ) [ 1168s] def test_maybe_promote_int_with_int(dtype, fill_value, expected_dtype): [ 1168s] dtype = np.dtype(dtype) [ 1168s] expected_dtype = np.dtype(expected_dtype) [ 1168s] [ 1168s] # output is not a generic int, but corresponds to expected_dtype [ 1168s] exp_val_for_scalar = np.array([fill_value], dtype=expected_dtype)[0] [ 1168s] [ 1168s] > _check_promote(dtype, fill_value, expected_dtype, exp_val_for_scalar) [ 1168s] [ 1168s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:237: [ 1168s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 1168s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:94: in _check_promote [ 1168s] _assert_match(result_fill_value, expected_fill_value) [ 1168s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 1168s] [ 1168s] result_fill_value = 65536, expected_fill_value = 65536 [ 1168s] [ 1168s] def _assert_match(result_fill_value, expected_fill_value): [ 1168s] # GH#23982/25425 require the same type in addition to equality/NA-ness [ 1168s] res_type = type(result_fill_value) [ 1168s] ex_type = type(expected_fill_value) [ 1168s] if res_type.__name__ == "uint64": [ 1168s] # No idea why, but these (sometimes) do not compare as equal [ 1168s] assert ex_type.__name__ == "uint64" [ 1168s] elif res_type.__name__ == "ulonglong": [ 1168s] # On some builds we get this instead of np.uint64 [ 1168s] # Note: cant check res_type.dtype.itemsize directly on numpy 1.18 [ 1168s] assert res_type(0).itemsize == 8 [ 1168s] assert ex_type == res_type or ex_type == np.uint64 [ 1168s] else: [ 1168s] # On some builds, type comparison fails, e.g. np.int32 != np.int32 [ 1168s] > assert res_type == ex_type or res_type.__name__ == ex_type.__name__ [ 1168s] E AssertionError: assert (<class 'numpy.uintc'> == <class 'numpy.uint32'> [ 1168s] E -<class 'numpy.uintc'> [ 1168s] E +<class 'numpy.uint32'> or 'uintc' == 'uint32' [ 1168s] E - uintc [ 1168s] E + uint32) [ 1168s] [ 1168s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:111: AssertionError [ 1168s] __________ test_maybe_promote_int_with_int[uint16-2147483648-uint32] ___________ [ 1168s] [gw7] linux -- Python 3.8.2 /usr/bin/python3 [ 1168s] [ 1168s] dtype = dtype('uint16'), fill_value = 2147483648 [ 1168s] expected_dtype = dtype('uint32') [ 1168s] [ 1168s] @pytest.mark.parametrize( [ 1168s] "dtype, fill_value, expected_dtype", [ 1168s] [ [ 1168s] # size 8 [ 1168s] ("int8", 1, "int8"), [ 1168s] ("int8", np.iinfo("int8").max + 1, "int16"), [ 1168s] ("int8", np.iinfo("int16").max + 1, "int32"), [ 1168s] ("int8", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int8", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int8", -1, "int8"), [ 1168s] ("int8", np.iinfo("int8").min - 1, "int16"), [ 1168s] ("int8", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("int8", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int8", np.iinfo("int64").min - 1, "object"), [ 1168s] # keep signed-ness as long as possible [ 1168s] ("uint8", 1, "uint8"), [ 1168s] ("uint8", np.iinfo("int8").max + 1, "uint8"), [ 1168s] ("uint8", np.iinfo("uint8").max + 1, "uint16"), [ 1168s] ("uint8", np.iinfo("int16").max + 1, "uint16"), [ 1168s] ("uint8", np.iinfo("uint16").max + 1, "uint32"), [ 1168s] ("uint8", np.iinfo("int32").max + 1, "uint32"), [ 1168s] ("uint8", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint8", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint8", np.iinfo("uint64").max + 1, "object"), [ 1168s] # max of uint8 cannot be contained in int8 [ 1168s] ("uint8", -1, "int16"), [ 1168s] ("uint8", np.iinfo("int8").min - 1, "int16"), [ 1168s] ("uint8", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("uint8", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("uint8", np.iinfo("int64").min - 1, "object"), [ 1168s] # size 16 [ 1168s] ("int16", 1, "int16"), [ 1168s] ("int16", np.iinfo("int8").max + 1, "int16"), [ 1168s] ("int16", np.iinfo("int16").max + 1, "int32"), [ 1168s] ("int16", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int16", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int16", -1, "int16"), [ 1168s] ("int16", np.iinfo("int8").min - 1, "int16"), [ 1168s] ("int16", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("int16", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int16", np.iinfo("int64").min - 1, "object"), [ 1168s] ("uint16", 1, "uint16"), [ 1168s] ("uint16", np.iinfo("int8").max + 1, "uint16"), [ 1168s] ("uint16", np.iinfo("uint8").max + 1, "uint16"), [ 1168s] ("uint16", np.iinfo("int16").max + 1, "uint16"), [ 1168s] ("uint16", np.iinfo("uint16").max + 1, "uint32"), [ 1168s] ("uint16", np.iinfo("int32").max + 1, "uint32"), [ 1168s] ("uint16", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint16", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint16", np.iinfo("uint64").max + 1, "object"), [ 1168s] ("uint16", -1, "int32"), [ 1168s] ("uint16", np.iinfo("int8").min - 1, "int32"), [ 1168s] ("uint16", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("uint16", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("uint16", np.iinfo("int64").min - 1, "object"), [ 1168s] # size 32 [ 1168s] ("int32", 1, "int32"), [ 1168s] ("int32", np.iinfo("int8").max + 1, "int32"), [ 1168s] ("int32", np.iinfo("int16").max + 1, "int32"), [ 1168s] ("int32", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int32", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int32", -1, "int32"), [ 1168s] ("int32", np.iinfo("int8").min - 1, "int32"), [ 1168s] ("int32", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("int32", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int32", np.iinfo("int64").min - 1, "object"), [ 1168s] ("uint32", 1, "uint32"), [ 1168s] ("uint32", np.iinfo("int8").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("uint8").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("int16").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("uint16").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("int32").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint32", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint32", np.iinfo("uint64").max + 1, "object"), [ 1168s] ("uint32", -1, "int64"), [ 1168s] ("uint32", np.iinfo("int8").min - 1, "int64"), [ 1168s] ("uint32", np.iinfo("int16").min - 1, "int64"), [ 1168s] ("uint32", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("uint32", np.iinfo("int64").min - 1, "object"), [ 1168s] # size 64 [ 1168s] ("int64", 1, "int64"), [ 1168s] ("int64", np.iinfo("int8").max + 1, "int64"), [ 1168s] ("int64", np.iinfo("int16").max + 1, "int64"), [ 1168s] ("int64", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int64", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int64", -1, "int64"), [ 1168s] ("int64", np.iinfo("int8").min - 1, "int64"), [ 1168s] ("int64", np.iinfo("int16").min - 1, "int64"), [ 1168s] ("int64", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int64", np.iinfo("int64").min - 1, "object"), [ 1168s] ("uint64", 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int8").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint8").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int16").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint16").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int32").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint64").max + 1, "object"), [ 1168s] ("uint64", -1, "object"), [ 1168s] ("uint64", np.iinfo("int8").min - 1, "object"), [ 1168s] ("uint64", np.iinfo("int16").min - 1, "object"), [ 1168s] ("uint64", np.iinfo("int32").min - 1, "object"), [ 1168s] ("uint64", np.iinfo("int64").min - 1, "object"), [ 1168s] ], [ 1168s] ) [ 1168s] def test_maybe_promote_int_with_int(dtype, fill_value, expected_dtype): [ 1168s] dtype = np.dtype(dtype) [ 1168s] expected_dtype = np.dtype(expected_dtype) [ 1168s] [ 1168s] # output is not a generic int, but corresponds to expected_dtype [ 1168s] exp_val_for_scalar = np.array([fill_value], dtype=expected_dtype)[0] [ 1168s] [ 1168s] > _check_promote(dtype, fill_value, expected_dtype, exp_val_for_scalar) [ 1168s] [ 1168s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:237: [ 1168s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 1168s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:94: in _check_promote [ 1168s] _assert_match(result_fill_value, expected_fill_value) [ 1168s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 1168s] [ 1168s] result_fill_value = 2147483648, expected_fill_value = 2147483648 [ 1168s] [ 1168s] def _assert_match(result_fill_value, expected_fill_value): [ 1168s] # GH#23982/25425 require the same type in addition to equality/NA-ness [ 1168s] res_type = type(result_fill_value) [ 1168s] ex_type = type(expected_fill_value) [ 1168s] if res_type.__name__ == "uint64": [ 1168s] # No idea why, but these (sometimes) do not compare as equal [ 1168s] assert ex_type.__name__ == "uint64" [ 1168s] elif res_type.__name__ == "ulonglong": [ 1168s] # On some builds we get this instead of np.uint64 [ 1168s] # Note: cant check res_type.dtype.itemsize directly on numpy 1.18 [ 1168s] assert res_type(0).itemsize == 8 [ 1168s] assert ex_type == res_type or ex_type == np.uint64 [ 1168s] else: [ 1168s] # On some builds, type comparison fails, e.g. np.int32 != np.int32 [ 1168s] > assert res_type == ex_type or res_type.__name__ == ex_type.__name__ [ 1168s] E AssertionError: assert (<class 'numpy.uintc'> == <class 'numpy.uint32'> [ 1168s] E -<class 'numpy.uintc'> [ 1168s] E +<class 'numpy.uint32'> or 'uintc' == 'uint32' [ 1168s] E - uintc [ 1168s] E + uint32) [ 1168s] [ 1168s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:111: AssertionError [ 1168s] _______________ test_maybe_promote_int_with_int[uint16--1-int32] _______________ [ 1168s] [gw7] linux -- Python 3.8.2 /usr/bin/python3 [ 1168s] [ 1168s] dtype = dtype('uint16'), fill_value = -1, expected_dtype = dtype('int32') [ 1168s] [ 1168s] @pytest.mark.parametrize( [ 1168s] "dtype, fill_value, expected_dtype", [ 1168s] [ [ 1168s] # size 8 [ 1168s] ("int8", 1, "int8"), [ 1168s] ("int8", np.iinfo("int8").max + 1, "int16"), [ 1168s] ("int8", np.iinfo("int16").max + 1, "int32"), [ 1168s] ("int8", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int8", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int8", -1, "int8"), [ 1168s] ("int8", np.iinfo("int8").min - 1, "int16"), [ 1168s] ("int8", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("int8", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int8", np.iinfo("int64").min - 1, "object"), [ 1168s] # keep signed-ness as long as possible [ 1168s] ("uint8", 1, "uint8"), [ 1168s] ("uint8", np.iinfo("int8").max + 1, "uint8"), [ 1168s] ("uint8", np.iinfo("uint8").max + 1, "uint16"), [ 1168s] ("uint8", np.iinfo("int16").max + 1, "uint16"), [ 1168s] ("uint8", np.iinfo("uint16").max + 1, "uint32"), [ 1168s] ("uint8", np.iinfo("int32").max + 1, "uint32"), [ 1168s] ("uint8", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint8", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint8", np.iinfo("uint64").max + 1, "object"), [ 1168s] # max of uint8 cannot be contained in int8 [ 1168s] ("uint8", -1, "int16"), [ 1168s] ("uint8", np.iinfo("int8").min - 1, "int16"), [ 1168s] ("uint8", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("uint8", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("uint8", np.iinfo("int64").min - 1, "object"), [ 1168s] # size 16 [ 1168s] ("int16", 1, "int16"), [ 1168s] ("int16", np.iinfo("int8").max + 1, "int16"), [ 1168s] ("int16", np.iinfo("int16").max + 1, "int32"), [ 1168s] ("int16", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int16", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int16", -1, "int16"), [ 1168s] ("int16", np.iinfo("int8").min - 1, "int16"), [ 1168s] ("int16", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("int16", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int16", np.iinfo("int64").min - 1, "object"), [ 1168s] ("uint16", 1, "uint16"), [ 1168s] ("uint16", np.iinfo("int8").max + 1, "uint16"), [ 1168s] ("uint16", np.iinfo("uint8").max + 1, "uint16"), [ 1168s] ("uint16", np.iinfo("int16").max + 1, "uint16"), [ 1168s] ("uint16", np.iinfo("uint16").max + 1, "uint32"), [ 1168s] ("uint16", np.iinfo("int32").max + 1, "uint32"), [ 1168s] ("uint16", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint16", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint16", np.iinfo("uint64").max + 1, "object"), [ 1168s] ("uint16", -1, "int32"), [ 1168s] ("uint16", np.iinfo("int8").min - 1, "int32"), [ 1168s] ("uint16", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("uint16", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("uint16", np.iinfo("int64").min - 1, "object"), [ 1168s] # size 32 [ 1168s] ("int32", 1, "int32"), [ 1168s] ("int32", np.iinfo("int8").max + 1, "int32"), [ 1168s] ("int32", np.iinfo("int16").max + 1, "int32"), [ 1168s] ("int32", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int32", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int32", -1, "int32"), [ 1168s] ("int32", np.iinfo("int8").min - 1, "int32"), [ 1168s] ("int32", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("int32", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int32", np.iinfo("int64").min - 1, "object"), [ 1168s] ("uint32", 1, "uint32"), [ 1168s] ("uint32", np.iinfo("int8").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("uint8").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("int16").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("uint16").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("int32").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint32", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint32", np.iinfo("uint64").max + 1, "object"), [ 1168s] ("uint32", -1, "int64"), [ 1168s] ("uint32", np.iinfo("int8").min - 1, "int64"), [ 1168s] ("uint32", np.iinfo("int16").min - 1, "int64"), [ 1168s] ("uint32", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("uint32", np.iinfo("int64").min - 1, "object"), [ 1168s] # size 64 [ 1168s] ("int64", 1, "int64"), [ 1168s] ("int64", np.iinfo("int8").max + 1, "int64"), [ 1168s] ("int64", np.iinfo("int16").max + 1, "int64"), [ 1168s] ("int64", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int64", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int64", -1, "int64"), [ 1168s] ("int64", np.iinfo("int8").min - 1, "int64"), [ 1168s] ("int64", np.iinfo("int16").min - 1, "int64"), [ 1168s] ("int64", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int64", np.iinfo("int64").min - 1, "object"), [ 1168s] ("uint64", 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int8").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint8").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int16").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint16").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int32").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint64").max + 1, "object"), [ 1168s] ("uint64", -1, "object"), [ 1168s] ("uint64", np.iinfo("int8").min - 1, "object"), [ 1168s] ("uint64", np.iinfo("int16").min - 1, "object"), [ 1168s] ("uint64", np.iinfo("int32").min - 1, "object"), [ 1168s] ("uint64", np.iinfo("int64").min - 1, "object"), [ 1168s] ], [ 1168s] ) [ 1168s] def test_maybe_promote_int_with_int(dtype, fill_value, expected_dtype): [ 1168s] dtype = np.dtype(dtype) [ 1168s] expected_dtype = np.dtype(expected_dtype) [ 1168s] [ 1168s] # output is not a generic int, but corresponds to expected_dtype [ 1168s] exp_val_for_scalar = np.array([fill_value], dtype=expected_dtype)[0] [ 1168s] [ 1168s] > _check_promote(dtype, fill_value, expected_dtype, exp_val_for_scalar) [ 1168s] [ 1168s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:237: [ 1168s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 1168s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:94: in _check_promote [ 1168s] _assert_match(result_fill_value, expected_fill_value) [ 1168s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 1168s] [ 1168s] result_fill_value = -1, expected_fill_value = -1 [ 1168s] [ 1168s] def _assert_match(result_fill_value, expected_fill_value): [ 1168s] # GH#23982/25425 require the same type in addition to equality/NA-ness [ 1168s] res_type = type(result_fill_value) [ 1168s] ex_type = type(expected_fill_value) [ 1168s] if res_type.__name__ == "uint64": [ 1168s] # No idea why, but these (sometimes) do not compare as equal [ 1168s] assert ex_type.__name__ == "uint64" [ 1168s] elif res_type.__name__ == "ulonglong": [ 1168s] # On some builds we get this instead of np.uint64 [ 1168s] # Note: cant check res_type.dtype.itemsize directly on numpy 1.18 [ 1168s] assert res_type(0).itemsize == 8 [ 1168s] assert ex_type == res_type or ex_type == np.uint64 [ 1168s] else: [ 1168s] # On some builds, type comparison fails, e.g. np.int32 != np.int32 [ 1168s] > assert res_type == ex_type or res_type.__name__ == ex_type.__name__ [ 1168s] E AssertionError: assert (<class 'numpy.intc'> == <class 'numpy.int32'> [ 1168s] E -<class 'numpy.intc'> [ 1168s] E +<class 'numpy.int32'> or 'intc' == 'int32' [ 1168s] E - intc [ 1168s] E + int32) [ 1168s] [ 1168s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:111: AssertionError [ 1168s] ______________ test_maybe_promote_int_with_int[uint16--129-int32] ______________ [ 1168s] [gw7] linux -- Python 3.8.2 /usr/bin/python3 [ 1168s] [ 1168s] dtype = dtype('uint16'), fill_value = -129, expected_dtype = dtype('int32') [ 1168s] [ 1168s] @pytest.mark.parametrize( [ 1168s] "dtype, fill_value, expected_dtype", [ 1168s] [ [ 1168s] # size 8 [ 1168s] ("int8", 1, "int8"), [ 1168s] ("int8", np.iinfo("int8").max + 1, "int16"), [ 1168s] ("int8", np.iinfo("int16").max + 1, "int32"), [ 1168s] ("int8", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int8", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int8", -1, "int8"), [ 1168s] ("int8", np.iinfo("int8").min - 1, "int16"), [ 1168s] ("int8", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("int8", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int8", np.iinfo("int64").min - 1, "object"), [ 1168s] # keep signed-ness as long as possible [ 1168s] ("uint8", 1, "uint8"), [ 1168s] ("uint8", np.iinfo("int8").max + 1, "uint8"), [ 1168s] ("uint8", np.iinfo("uint8").max + 1, "uint16"), [ 1168s] ("uint8", np.iinfo("int16").max + 1, "uint16"), [ 1168s] ("uint8", np.iinfo("uint16").max + 1, "uint32"), [ 1168s] ("uint8", np.iinfo("int32").max + 1, "uint32"), [ 1168s] ("uint8", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint8", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint8", np.iinfo("uint64").max + 1, "object"), [ 1168s] # max of uint8 cannot be contained in int8 [ 1168s] ("uint8", -1, "int16"), [ 1168s] ("uint8", np.iinfo("int8").min - 1, "int16"), [ 1168s] ("uint8", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("uint8", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("uint8", np.iinfo("int64").min - 1, "object"), [ 1168s] # size 16 [ 1168s] ("int16", 1, "int16"), [ 1168s] ("int16", np.iinfo("int8").max + 1, "int16"), [ 1168s] ("int16", np.iinfo("int16").max + 1, "int32"), [ 1168s] ("int16", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int16", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int16", -1, "int16"), [ 1168s] ("int16", np.iinfo("int8").min - 1, "int16"), [ 1168s] ("int16", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("int16", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int16", np.iinfo("int64").min - 1, "object"), [ 1168s] ("uint16", 1, "uint16"), [ 1168s] ("uint16", np.iinfo("int8").max + 1, "uint16"), [ 1168s] ("uint16", np.iinfo("uint8").max + 1, "uint16"), [ 1168s] ("uint16", np.iinfo("int16").max + 1, "uint16"), [ 1168s] ("uint16", np.iinfo("uint16").max + 1, "uint32"), [ 1168s] ("uint16", np.iinfo("int32").max + 1, "uint32"), [ 1168s] ("uint16", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint16", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint16", np.iinfo("uint64").max + 1, "object"), [ 1168s] ("uint16", -1, "int32"), [ 1168s] ("uint16", np.iinfo("int8").min - 1, "int32"), [ 1168s] ("uint16", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("uint16", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("uint16", np.iinfo("int64").min - 1, "object"), [ 1168s] # size 32 [ 1168s] ("int32", 1, "int32"), [ 1168s] ("int32", np.iinfo("int8").max + 1, "int32"), [ 1168s] ("int32", np.iinfo("int16").max + 1, "int32"), [ 1168s] ("int32", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int32", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int32", -1, "int32"), [ 1168s] ("int32", np.iinfo("int8").min - 1, "int32"), [ 1168s] ("int32", np.iinfo("int16").min - 1, "int32"), [ 1168s] ("int32", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int32", np.iinfo("int64").min - 1, "object"), [ 1168s] ("uint32", 1, "uint32"), [ 1168s] ("uint32", np.iinfo("int8").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("uint8").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("int16").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("uint16").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("int32").max + 1, "uint32"), [ 1168s] ("uint32", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint32", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint32", np.iinfo("uint64").max + 1, "object"), [ 1168s] ("uint32", -1, "int64"), [ 1168s] ("uint32", np.iinfo("int8").min - 1, "int64"), [ 1168s] ("uint32", np.iinfo("int16").min - 1, "int64"), [ 1168s] ("uint32", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("uint32", np.iinfo("int64").min - 1, "object"), [ 1168s] # size 64 [ 1168s] ("int64", 1, "int64"), [ 1168s] ("int64", np.iinfo("int8").max + 1, "int64"), [ 1168s] ("int64", np.iinfo("int16").max + 1, "int64"), [ 1168s] ("int64", np.iinfo("int32").max + 1, "int64"), [ 1168s] ("int64", np.iinfo("int64").max + 1, "object"), [ 1168s] ("int64", -1, "int64"), [ 1168s] ("int64", np.iinfo("int8").min - 1, "int64"), [ 1168s] ("int64", np.iinfo("int16").min - 1, "int64"), [ 1168s] ("int64", np.iinfo("int32").min - 1, "int64"), [ 1168s] ("int64", np.iinfo("int64").min - 1, "object"), [ 1168s] ("uint64", 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int8").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint8").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int16").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint16").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int32").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint32").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("int64").max + 1, "uint64"), [ 1168s] ("uint64", np.iinfo("uint64").max + 1, "object"), [ 1168s] ("uint64", -1, "object"), [ 1168s] ("uint64", np.iinfo("int8").min - 1, "object"), [ 1168s] ("uint64", np.iinfo("int16").min - 1, "object"), [ 1168s] ("uint64", np.iinfo("int32").min - 1, "object"), [ 1168s] ("uint64", np.iinfo("int64").min - 1, "object"), [ 1168s] ], [ 1168s] ) [ 1168s] def test_maybe_promote_int_with_int(dtype, fill_value, expected_dtype): [ 1168s] dtype = np.dtype(dtype) [ 1168s] expected_dtype = np.dtype(expected_dtype) [ 1168s] [ 1168s] # output is not a generic int, but corresponds to expected_dtype [ 1168s] exp_val_for_scalar = np.array([fill_value], dtype=expected_dtype)[0] [ 1168s] [ 1168s] > _check_promote(dtype, fill_value, expected_dtype, exp_val_for_scalar) [ 1168s] [ 1168s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:237: [ 1168s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 1168s] ../../BUILDROOT/python-pandas-1.0.2-37.1.i386/usr/lib/python3.8/site-packages/pandas/tests/dtypes/cast/test_promote.py:94: in _check_promote [ 1168s] _assert_match(result_fill_value, expected_fill_value) [ 1168s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 1168s] [ 1168s] result_fill_value = -129, expected_fill_value = -129 [ 1168s] [ 1168s] def _assert_match(result_fill_value, expected_fill_value): [ 1168s] # GH#23982/25425 require the same type in addition to equality/NA-ness [ 1168s] res_type = type(result_fill_value) [ 1168s] ex_type = type(expected_fill_value) [ 1168s] if res_type.__name__ == "uint64": [ 1168s] # No idea why, but these (sometimes) do not compare as equal [ 1168s] assert ex_type.__name__ == "uint64" [ 1168s] elif res_type.__name__ == "ulonglong": [ 1168s] # On some builds we get this instead of np.uint64 [ 1168s] # Note: cant check res_type.dtype.itemsize directly on numpy 1.18 [ 1168s] assert res_type(0).itemsize == 8 [ 1168s] assert ex_type == res_type or ex_type == np.uint64 [ 1168s] else: [ 1168s] # On some builds, type comparison fails, e.g. np.int32 != np.int32 [ 1168s] > assert res_type == ex_type or res_type.__name__ == ex_type.__name__ [ 1168s] E AssertionError: assert (<class 'numpy.intc'> == <class 'numpy.int32'> [ 1168s] E -<class 'numpy.intc'> [ 1168s] E +<class 'numpy.int32'> or 'intc' == 'int32' [ 1168s] E - intc [ 1168s] E + int32)
You can find the full build log here
The text was updated successfully, but these errors were encountered:
Duplicate of #31856 I think. If you're able to provide any guidance there we'd appreciate it. None of the devs is on a 32-bit machine.
Sorry, something went wrong.
No branches or pull requests
Apart from Test warnings noted here, we face plain test failures, that prevent packaging pandas for ix86 systems with Python 3.8.2 at least:
You can find the full build log here
The text was updated successfully, but these errors were encountered: