Verify reading a V1 file emits one DeprecationWarning, not two.
(tempdir)
| 909 | @pytest.mark.pandas |
| 910 | @pytest.mark.filterwarnings("default:Feather V1:DeprecationWarning") |
| 911 | def test_read_feather_v1_no_double_warning(tempdir): |
| 912 | """Verify reading a V1 file emits one DeprecationWarning, not two.""" |
| 913 | table = pa.table({"a": [1, 2, 3]}) |
| 914 | path = str(tempdir / "test.feather") |
| 915 | with warnings.catch_warnings(): |
| 916 | warnings.simplefilter("ignore", DeprecationWarning) |
| 917 | write_feather(table, path, version=1) |
| 918 | with warnings.catch_warnings(record=True) as w: |
| 919 | warnings.simplefilter("always") |
| 920 | read_feather(path) |
| 921 | v1_warnings = [x for x in w if issubclass(x.category, |
| 922 | DeprecationWarning)] |
| 923 | assert len(v1_warnings) == 1 |
nothing calls this directly
no test coverage detected