Skip to content

Commit b610608

Browse files
committed
Revert parts of pandas-dev#35711
1 parent eab5d63 commit b610608

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

pandas/conftest.py

-9
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,6 @@ def add_imports(doctest_namespace):
157157
doctest_namespace["pd"] = pd
158158

159159

160-
@pytest.fixture(autouse=True)
161-
def check_file_leaks():
162-
"""
163-
Check that a test does not leak file handles.
164-
"""
165-
with td.file_leak_context():
166-
yield
167-
168-
169160
# ----------------------------------------------------------------
170161
# Common arguments
171162
# ----------------------------------------------------------------

pandas/tests/io/parser/test_common.py

+1
Original file line numberDiff line numberDiff line change
@@ -1836,6 +1836,7 @@ def test_raise_on_no_columns(all_parsers, nrows):
18361836
parser.read_csv(StringIO(data))
18371837

18381838

1839+
@td.check_file_leaks
18391840
def test_memory_map(all_parsers, csv_dir_path):
18401841
mmap_file = os.path.join(csv_dir_path, "test_mmap.csv")
18411842
parser = all_parsers

pandas/tests/io/test_sql.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,7 @@ def _get_all_tables(self):
263263
return table_list
264264

265265
def _close_conn(self):
266-
# https://docs.sqlalchemy.org/en/13/core/connections.html#engine-disposal
267-
self.conn.dispose()
266+
pass
268267

269268

270269
class PandasSQLTest:
@@ -1243,7 +1242,7 @@ class _TestSQLAlchemy(SQLAlchemyMixIn, PandasSQLTest):
12431242
def setup_class(cls):
12441243
cls.setup_import()
12451244
cls.setup_driver()
1246-
conn = cls.conn = cls.connect()
1245+
conn = cls.connect()
12471246
conn.connect()
12481247

12491248
def load_test_data_and_sql(self):

0 commit comments

Comments
 (0)