1111pyreadstat = 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 ])
1518def 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" )
3034def 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" )
4550def 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" )
6066def 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" )
7481def 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" )
131139def test_spss_metadata (datapath ):
132140 # GH 54264
133141 fname = datapath ("io" , "data" , "spss" , "labelled-num.sav" )
0 commit comments