Skip to content

Commit 244cab4

Browse files
Correct pytest raises
1 parent ded7dd0 commit 244cab4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/tests/io/test_pytables.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,8 @@ def test_read_missing_key_close_store(self):
12291229
df = pd.DataFrame({'a': range(2), 'b': range(2)})
12301230
df.to_hdf(path, 'k1')
12311231

1232-
pytest.raises(KeyError, pd.read_hdf, path, 'k2')
1232+
with pytest.raises(KeyError):
1233+
pd.read_hdf(path, 'k2')
12331234

12341235
df.to_hdf(path, 'k2')
12351236

0 commit comments

Comments
 (0)