MCPcopy Create free account
hub / github.com/apache/arrow / test_read_feather_v1_no_double_warning

Function test_read_feather_v1_no_double_warning

python/pyarrow/tests/test_feather.py:925–937  ·  view source on GitHub ↗

Verify reading a V1 file emits one DeprecationWarning, not two.

(tempdir)

Source from the content-addressed store, hash-verified

923@pytest.mark.pandas
924@pytest.mark.filterwarnings("default:Feather V1:DeprecationWarning")
925def test_read_feather_v1_no_double_warning(tempdir):
926 """Verify reading a V1 file emits one DeprecationWarning, not two."""
927 table = pa.table({"a": [1, 2, 3]})
928 path = str(tempdir / "test.feather")
929 with warnings.catch_warnings():
930 warnings.simplefilter("ignore", DeprecationWarning)
931 write_feather(table, path, version=1)
932 with warnings.catch_warnings(record=True) as w:
933 warnings.simplefilter("always")
934 read_feather(path)
935 v1_warnings = [x for x in w if issubclass(x.category,
936 DeprecationWarning)]
937 assert len(v1_warnings) == 1

Callers

nothing calls this directly

Calls 3

write_featherFunction · 0.90
read_featherFunction · 0.90
lenFunction · 0.85

Tested by

no test coverage detected