From: Debian Science Team Date: Sun, 2 Feb 2025 11:17:13 +0000 (+0000) Subject: Ignore pytables test failures with Python 3.12 X-Git-Tag: archive/raspbian/2.2.3+dfsg-7+rpi1~12 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3c89625c33ece73627bee12fbff1c4c14f111d7d;p=pandas.git Ignore pytables test failures with Python 3.12 The combined xfails are because two separate xfails where only one has run=False may run, which is a problem when the run=False exists to avoid a crash - see 1.5.3+dfsg-8 armhf build log Bug-Debian: https://bugs.debian.org/1055801 Bug-Ubuntu: https://launchpad.net/ubuntu/+bug/2043895 Author: Rebecca N. Palmer Forwarded: no Gbp-Pq: Name pytables_python3p12.patch --- diff --git a/pandas/tests/io/pytables/test_append.py b/pandas/tests/io/pytables/test_append.py index 488e11e0..3acfd8ef 100644 --- a/pandas/tests/io/pytables/test_append.py +++ b/pandas/tests/io/pytables/test_append.py @@ -286,7 +286,8 @@ def test_append_all_nans(setup_path): tm.assert_frame_equal(store["df2"], df, check_index_type=True) -@pytest.mark.xfail(condition=is_crashing_arch,reason="https://bugs.debian.org/790925",strict=False,run=False) +from pandas.compat import PY312 +@pytest.mark.xfail(condition=PY312 or is_crashing_arch, reason="https://bugs.debian.org/1055801 and https://bugs.debian.org/790925",raises=ValueError,strict=False, run=not is_crashing_arch) def test_append_frame_column_oriented(setup_path): with ensure_clean_store(setup_path) as store: # column oriented diff --git a/pandas/tests/io/pytables/test_select.py b/pandas/tests/io/pytables/test_select.py index 0e303d1c..e76fa88d 100644 --- a/pandas/tests/io/pytables/test_select.py +++ b/pandas/tests/io/pytables/test_select.py @@ -168,6 +168,8 @@ def test_select(setup_path): tm.assert_frame_equal(expected, result) +from pandas.compat import PY312 +@pytest.mark.xfail(condition=PY312, reason="python3.12 https://bugs.debian.org/1055801",raises=ValueError,strict=False) def test_select_dtypes(setup_path): with ensure_clean_store(setup_path) as store: # with a Timestamp data column (GH #2637) @@ -607,6 +609,7 @@ def test_select_iterator_many_empty_frames(setup_path): assert len(results) == 0 +@pytest.mark.xfail(condition=PY312, reason="python3.12 https://bugs.debian.org/1055801",raises=TypeError,strict=False) def test_frame_select(setup_path): df = DataFrame( np.random.default_rng(2).standard_normal((10, 4)), diff --git a/pandas/tests/io/pytables/test_store.py b/pandas/tests/io/pytables/test_store.py index d99109c0..4172e12a 100644 --- a/pandas/tests/io/pytables/test_store.py +++ b/pandas/tests/io/pytables/test_store.py @@ -884,7 +884,8 @@ def test_start_stop_fixed(setup_path): df.iloc[8:10, -2] = np.nan -@pytest.mark.xfail(condition=is_crashing_arch,reason="https://bugs.debian.org/790925",strict=False,run=False) +from pandas.compat import PY312 +@pytest.mark.xfail(condition=PY312 or is_crashing_arch, reason="https://bugs.debian.org/1055801 and https://bugs.debian.org/790925",raises=ValueError,strict=False, run=not is_crashing_arch) def test_select_filter_corner(setup_path): df = DataFrame(np.random.default_rng(2).standard_normal((50, 100))) df.index = [f"{c:3d}" for c in df.index]