MCPcopy Create free account
hub / github.com/PrefectHQ/fastmcp / test_load_server_nonexistent

Method test_load_server_nonexistent

tests/cli/test_run.py:89–95  ·  view source on GitHub ↗

Test loading nonexistent file path exits.

(self)

Source from the content-addressed store, hash-verified

87 assert source.entrypoint == "app"
88
89 async def test_load_server_nonexistent(self):
90 """Test loading nonexistent file path exits."""
91 source = FileSystemSource(path="nonexistent.py")
92 with pytest.raises(SystemExit) as exc_info:
93 await source.load_server()
94 assert isinstance(exc_info.value, SystemExit)
95 assert exc_info.value.code == 1
96
97 async def test_load_server_directory(self, tmp_path):
98 """Test loading directory path exits."""

Callers

nothing calls this directly

Calls 2

load_serverMethod · 0.95
FileSystemSourceClass · 0.90

Tested by

no test coverage detected