We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f336549 commit a504f4fCopy full SHA for a504f4f
pandas/tests/io/pytables/test_read.py
@@ -42,6 +42,20 @@ def test_read_missing_key_close_store(tmp_path, setup_path):
42
df.to_hdf(path, "k2")
43
44
45
+def test_read_index_error_close_store(tmp_path, setup_path):
46
+ # GH 25766
47
+ path = tmp_path / setup_path
48
+ df = pd.DataFrame({"A": [], "B": []}, index=[])
49
+ df.to_hdf(path, "k1")
50
+
51
+ with pytest.raises(IndexError, match=r"list index out of range"):
52
+ read_hdf(path, "k1", stop=0)
53
54
+ # smoke test to test that file is properly closed after
55
+ # read with IndexError before another write
56
57
58
59
def test_read_missing_key_opened_store(tmp_path, setup_path):
60
# GH 28699
61
path = tmp_path / setup_path
0 commit comments