Compare commits

...

2 Commits

Author SHA1 Message Date
Dan Tasse
cfa057351f lint 2026-03-25 11:49:13 -04:00
Dan Tasse
a5a80acf8b fix: change _client reference to _conn 2026-03-25 11:44:13 -04:00
2 changed files with 13 additions and 1 deletions

View File

@@ -568,4 +568,4 @@ class RemoteDBConnection(DBConnection):
async def close(self):
"""Close the connection to the database."""
self._client.close()
self._conn.close()

View File

@@ -1201,6 +1201,18 @@ async def test_header_provider_overrides_static_headers():
await db.table_names()
def test_close():
"""Test that close() works without AttributeError."""
import asyncio
def handler(req):
req.send_response(200)
req.end_headers()
with mock_lancedb_connection(handler) as db:
asyncio.run(db.close())
@pytest.mark.parametrize("exception", [KeyboardInterrupt, SystemExit, GeneratorExit])
def test_background_loop_cancellation(exception):
"""Test that BackgroundEventLoop.run() cancels the future on interrupt."""