Source: pandas Version: 1.3.5+dfsg-5 Severity: serious Tags: ftbfs https://buildd.debian.org/status/logs.php?pkg=pandas&ver=1.3.5%2Bdfsg-5%2Bb2
... =================================== FAILURES =================================== _____________________ TestCategoricalAPI.test_set_ordered ______________________ self = <pandas.tests.arrays.categorical.test_api.TestCategoricalAPI object at 0x7f9b56ac27d0> def test_set_ordered(self): cat = Categorical(["a", "b", "c", "a"], ordered=True) cat2 = cat.as_unordered() assert not cat2.ordered cat2 = cat.as_ordered() assert cat2.ordered cat2.as_unordered(inplace=True) assert not cat2.ordered cat2.as_ordered(inplace=True) assert cat2.ordered assert cat2.set_ordered(True).ordered assert not cat2.set_ordered(False).ordered cat2.set_ordered(True, inplace=True) assert cat2.ordered cat2.set_ordered(False, inplace=True) assert not cat2.ordered # removed in 0.19.0 msg = "can't set attribute" with pytest.raises(AttributeError, match=msg): > cat.ordered = True E AttributeError: property 'ordered' of 'Categorical' object has no setter pandas/tests/arrays/categorical/test_api.py:59: AttributeError During handling of the above exception, another exception occurred: self = <pandas.tests.arrays.categorical.test_api.TestCategoricalAPI object at 0x7f9b56ac27d0> def test_set_ordered(self): cat = Categorical(["a", "b", "c", "a"], ordered=True) cat2 = cat.as_unordered() assert not cat2.ordered cat2 = cat.as_ordered() assert cat2.ordered cat2.as_unordered(inplace=True) assert not cat2.ordered cat2.as_ordered(inplace=True) assert cat2.ordered assert cat2.set_ordered(True).ordered assert not cat2.set_ordered(False).ordered cat2.set_ordered(True, inplace=True) assert cat2.ordered cat2.set_ordered(False, inplace=True) assert not cat2.ordered # removed in 0.19.0 msg = "can't set attribute" > with pytest.raises(AttributeError, match=msg): E AssertionError: Regex pattern "can't set attribute" does not match "property 'ordered' of 'Categorical' object has no setter". pandas/tests/arrays/categorical/test_api.py:58: AssertionError ________________ TestPrivateCategoricalAPI.test_codes_immutable ________________ self = <pandas.tests.arrays.categorical.test_api.TestPrivateCategoricalAPI object at 0x7f9b56b0c790> def test_codes_immutable(self): # Codes should be read only c = Categorical(["a", "b", "c", "a", np.nan]) exp = np.array([0, 1, 2, 0, -1], dtype="int8") tm.assert_numpy_array_equal(c.codes, exp) # Assignments to codes should raise with pytest.raises(AttributeError, match="can't set attribute"): > c.codes = np.array([0, 1, 2, 0, 1], dtype="int8") E AttributeError: property 'codes' of 'Categorical' object has no setter pandas/tests/arrays/categorical/test_api.py:512: AttributeError During handling of the above exception, another exception occurred: self = <pandas.tests.arrays.categorical.test_api.TestPrivateCategoricalAPI object at 0x7f9b56b0c790> def test_codes_immutable(self): # Codes should be read only c = Categorical(["a", "b", "c", "a", np.nan]) exp = np.array([0, 1, 2, 0, -1], dtype="int8") tm.assert_numpy_array_equal(c.codes, exp) # Assignments to codes should raise > with pytest.raises(AttributeError, match="can't set attribute"): E AssertionError: Regex pattern "can't set attribute" does not match "property 'codes' of 'Categorical' object has no setter". pandas/tests/arrays/categorical/test_api.py:511: AssertionError - generated xml file: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/test-data.xml - ============================= slowest 30 durations ============================= 0.38s teardown .pybuild/cpython3_3.11/build/pandas/tests/arrays/timedeltas/test_reductions.py::TestReductions::test_mean_2d 0.21s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/interval/test_interval.py::TestAttributes::test_is_empty[both-IntervalIndex-left2-right2] 0.15s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/test_datetimelike.py::TestDatetimeArray::test_int_properties[pytz.FixedOffset(300)-Y-day_of_week] 0.10s teardown .pybuild/cpython3_3.11/build/pandas/tests/arrays/test_datetimelike.py::TestDatetimeArray::test_searchsorted_castable_strings[pyarrow-'dateutil/Asia/Singapore'-M-index] 0.09s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/test_datetimelike.py::TestDatetimeArray::test_compare_categorical_dtype[False-'-02:15'-Y-True-False] 0.04s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/categorical/test_dtypes.py::TestCategoricalDtypes::test_codes_dtypes 0.03s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/sparse/test_arithmetics.py::TestSparseArrayArithmetics::test_mixed_array_comparison[integer] 0.03s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/sparse/test_arithmetics.py::TestSparseArrayArithmetics::test_mixed_array_comparison[block] 0.03s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/test_datetimes.py::TestDatetimeArray::test_astype_int[uint64] 0.03s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/test_datetimes.py::TestDatetimeArray::test_astype_int[int] 0.03s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/test_datetimes.py::TestDatetimeArray::test_astype_int[int32] 0.03s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/test_datetimes.py::TestDatetimeArray::test_astype_int[int64] 0.03s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/test_datetimes.py::TestDatetimeArray::test_astype_int[uint32] 0.03s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/test_timedeltas.py::TestTimedeltaArray::test_astype_int[int] 0.03s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/test_timedeltas.py::TestTimedeltaArray::test_astype_int[uint32] 0.03s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/test_timedeltas.py::TestTimedeltaArray::test_astype_int[uint64] 0.03s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/test_timedeltas.py::TestTimedeltaArray::test_astype_int[int64] 0.03s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/test_timedeltas.py::TestTimedeltaArray::test_astype_int[int32] 0.02s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/period/test_astype.py::test_astype[int] 0.02s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/sparse/test_arithmetics.py::TestSparseArrayArithmetics::test_float_array_comparison[integer] 0.02s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/period/test_astype.py::test_astype[uint64] 0.02s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/period/test_astype.py::test_astype_copies 0.02s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/period/test_astype.py::test_astype[int64] 0.02s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/period/test_astype.py::test_astype[int32] 0.02s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/period/test_astype.py::test_astype[uint32] 0.02s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/sparse/test_arithmetics.py::TestSparseArrayArithmetics::test_int_array_comparison[integer] 0.02s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/sparse/test_arithmetics.py::TestSparseArrayArithmetics::test_float_array_comparison[block] 0.02s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/sparse/test_arithmetics.py::TestSparseArrayArithmetics::test_int_array_comparison[block] 0.02s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/test_datetimes.py::TestDatetimeArray::test_astype_copies[datetime64[ns]-datetime64[ns, UTC]] 0.02s call .pybuild/cpython3_3.11/build/pandas/tests/arrays/categorical/test_api.py::TestCategoricalAPIWithFactor::test_describe =========================== short test summary info ============================ FAILED pandas/tests/arrays/categorical/test_api.py::TestCategoricalAPI::test_set_ordered FAILED pandas/tests/arrays/categorical/test_api.py::TestPrivateCategoricalAPI::test_codes_immutable ========== 2 failed, 12698 passed, 526 skipped, 69 xfailed in 43.93s ===========