mirror of
https://github.com/simonw/datasette.git
synced 2026-09-03 23:24:07 +02:00
Explain why serve_with_plugins needs a subprocess and plugin files
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012U7coQfVu8nK2R4q2mCULA
This commit is contained in:
parent
d4b6d6cf4e
commit
55b995e5a3
1 changed files with 4 additions and 0 deletions
|
|
@ -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::
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue