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 71885ec commit 97897e1Copy full SHA for 97897e1
pandas/tests/io/test_sql.py
@@ -1,7 +1,6 @@
1
from __future__ import annotations
2
3
import contextlib
4
-from contextlib import closing
5
import csv
6
from datetime import (
7
date,
@@ -2580,10 +2579,10 @@ def test_sql_open_close(test_frame3):
2580
2579
# between the writing and reading (as in many real situations).
2581
2582
with tm.ensure_clean() as name:
2583
- with closing(sqlite3.connect(name)) as conn:
+ with contextlib.closing(sqlite3.connect(name)) as conn:
2584
assert sql.to_sql(test_frame3, "test_frame3_legacy", conn, index=False) == 4
2585
2586
2587
result = sql.read_sql_query("SELECT * FROM test_frame3_legacy;", conn)
2588
2589
tm.assert_frame_equal(test_frame3, result)
0 commit comments