MCPcopy
hub / github.com/encode/uvicorn / test_subprocess_started

Function test_subprocess_started

tests/test_subprocess.py:31–43  ·  tests/test_subprocess.py::test_subprocess_started
()

Source from the content-addressed store, hash-verified

29
30
31def test_subprocess_started() -> None:
32 fdsock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
33 fd = fdsock.fileno()
34 config = Config(app=app, fd=fd)
35 config.load()
36
37 with patch(class="st">"tests.test_subprocess.server_run") as mock_run:
38 with patch.object(config, class="st">"configure_logging") as mock_config_logging:
39 subprocess_started(config, server_run, [fdsock], None)
40 mock_run.assert_called_once()
41 mock_config_logging.assert_called_once()
42
43 fdsock.close()

Callers

nothing calls this directly

Calls 4

loadMethod · 0.95
ConfigClass · 0.90
subprocess_startedFunction · 0.90
closeMethod · 0.45

Tested by

no test coverage detected