From 6887c12ea30598e7d06d20cd6b2a2ef8256a9fa1 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 23 Oct 2022 15:13:02 -0700 Subject: [PATCH] Workaround for 'too many open files' error, refs #1843 --- tests/fixtures.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/fixtures.py b/tests/fixtures.py index 5a875cd2..13a3dffa 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -163,6 +163,9 @@ def make_app_client( crossdb=crossdb, ) yield TestClient(ds) + # Close the connection to avoid "too many open files" errors + conn.close() + os.remove(filepath) @pytest.fixture(scope="session")