From 55b995e5a3777913698e244a1f813d876d4c54ff Mon Sep 17 00:00:00 2001 From: Alex Garcia Date: Mon, 31 Aug 2026 11:52:27 -0700 Subject: [PATCH] Explain why serve_with_plugins needs a subprocess and plugin files Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_012U7coQfVu8nK2R4q2mCULA --- tests/conftest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 6b0608ee..309ba1e4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -321,6 +321,10 @@ def serve_with_plugins(tmp_path): """Factory fixture for starting ``datasette serve`` in a subprocess with plugins written to a temporary ``--plugins-dir``. + For tests that need the real serve path: event-loop wiring, exit codes, + signals. The usual in-process ``pm.register`` plugin pattern can't reach + a subprocess, so plugin source is written out as importable files instead. + Unlike ``ds_localhost_http_server`` this is function-scoped and takes a fresh port each time, because each test needs its own plugins. Call it as::