@@ -48,7 +48,13 @@ Example using pyproject.toml:
4848addopts = " -p pytest_hot_reloading.plugin"
4949```
5050
51- When running pytest, the plugin will detect whether the daemon is running, and start it if is not.
51+ When running pytest, the plugin will detect whether the daemon is running.
52+ If the daemon is not running, it will error unless the ` --daemon-start-if-needed ` argument is passed.
53+
54+ The current version of the VS Code Python extension is not, by default, compatible with automatically starting the daemon. The
55+ test runner will hang. However, you can revert to legacy behavior which will allow for using the automatic starting.
56+ See the VS Code section below for more information.
57+
5258Note that a pid file is created to track the pid.
5359
5460Imports and in many cases initialization logic are not reran on subsequent runs, which can be a huge time saver.
@@ -103,6 +109,23 @@ the daemon.
103109
104110The daemon can be stopped with ` pytest --stop-daemon ` . This can be used if it gets into a bad state.
105111
112+ To enable automatically starting the server, you have to, currently, disable the new Python Test Adapter:
113+
114+ In your devcontainer.json or user settings:
115+ ``` json
116+ "python.experiments.optOutFrom" : [
117+ " pythonTestAdapter"
118+ ],
119+ ```
120+
121+ Then enable automatically starting the daemon in your settings:
122+ ``` json
123+ "python.testing.pytestArgs" : [
124+ " --daemon-start-if-needed" ,
125+ " tests"
126+ ],
127+ ```
128+
106129## Arguments and Env Variables
107130- ` PYTEST_DAEMON_PORT `
108131 - The port the daemon listens on.
0 commit comments