Skip to content

Commit 7d506cb

Browse files
add back filterwarnings for spss cython issue
1 parent 1188bf1 commit 7d506cb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/io/test_spss.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
pyreadstat = pytest.importorskip("pyreadstat")
1212

1313

14+
# TODO(CoW) - detection of chained assignment in cython
15+
# https://github.com/pandas-dev/pandas/issues/51315
16+
@pytest.mark.filterwarnings("ignore::pandas.errors.ChainedAssignmentError")
1417
@pytest.mark.parametrize("path_klass", [lambda p: p, Path])
1518
def test_spss_labelled_num(path_klass, datapath):
1619
# test file from the Haven project (https://haven.tidyverse.org/)
@@ -27,6 +30,7 @@ def test_spss_labelled_num(path_klass, datapath):
2730
tm.assert_frame_equal(df, expected)
2831

2932

33+
@pytest.mark.filterwarnings("ignore::pandas.errors.ChainedAssignmentError")
3034
def test_spss_labelled_num_na(datapath):
3135
# test file from the Haven project (https://haven.tidyverse.org/)
3236
# Licence at LICENSES/HAVEN_LICENSE, LICENSES/HAVEN_MIT
@@ -42,6 +46,7 @@ def test_spss_labelled_num_na(datapath):
4246
tm.assert_frame_equal(df, expected)
4347

4448

49+
@pytest.mark.filterwarnings("ignore::pandas.errors.ChainedAssignmentError")
4550
def test_spss_labelled_str(datapath):
4651
# test file from the Haven project (https://haven.tidyverse.org/)
4752
# Licence at LICENSES/HAVEN_LICENSE, LICENSES/HAVEN_MIT
@@ -57,6 +62,7 @@ def test_spss_labelled_str(datapath):
5762
tm.assert_frame_equal(df, expected)
5863

5964

65+
@pytest.mark.filterwarnings("ignore::pandas.errors.ChainedAssignmentError")
6066
def test_spss_kwargs(datapath):
6167
# test file from the Haven project (https://haven.tidyverse.org/)
6268
# Licence at LICENSES/HAVEN_LICENSE, LICENSES/HAVEN_MIT
@@ -71,6 +77,7 @@ def test_spss_kwargs(datapath):
7177
tm.assert_frame_equal(df, expected)
7278

7379

80+
@pytest.mark.filterwarnings("ignore::pandas.errors.ChainedAssignmentError")
7481
def test_spss_umlauts(datapath):
7582
# test file from the Haven project (https://haven.tidyverse.org/)
7683
# Licence at LICENSES/HAVEN_LICENSE, LICENSES/HAVEN_MIT
@@ -128,6 +135,7 @@ def test_invalid_dtype_backend():
128135
pd.read_spss("test", dtype_backend="numpy")
129136

130137

138+
@pytest.mark.filterwarnings("ignore::pandas.errors.ChainedAssignmentError")
131139
def test_spss_metadata(datapath):
132140
# GH 54264
133141
fname = datapath("io", "data", "spss", "labelled-num.sav")

0 commit comments

Comments
 (0)