MCPcopy
hub / github.com/pex-tool/pex / script_server

Function script_server

tests/integration/cli/commands/test_run.py:394–413  ·  view source on GitHub ↗
(
    tmpdir,  # type: Tempdir
    script,  # type: str
    cowsay_pylock,  # type: str
)

Source from the content-addressed store, hash-verified

392
393@pytest.fixture
394def script_server(
395 tmpdir, # type: Tempdir
396 script, # type: str
397 cowsay_pylock, # type: str
398):
399 # type: (...) -> Iterator[ServerInfo]
400
401 script_dir = os.path.dirname(script)
402 safe_copy(cowsay_pylock, os.path.join(script_dir, "pylock.toml"))
403
404 server = Server(name="Test Providers Server", cache_dir=tmpdir.join("server"))
405 result = server.launch(
406 script_dir,
407 timeout=float(os.environ.get("_PEX_HTTP_SERVER_TIMEOUT", "5.0")),
408 verbose_error=True,
409 )
410 try:
411 yield result.server_info
412 finally:
413 server.shutdown()
414
415
416CI_skip_mac = pytest.mark.xfail(

Callers

nothing calls this directly

Calls 6

launchMethod · 0.95
shutdownMethod · 0.95
safe_copyFunction · 0.90
ServerClass · 0.90
joinMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected