Skip to content

Commit 69cdfdf

Browse files
committed
test: mark unreachable return in test helpers as no-cover
Github-Issue: #2453
1 parent 159b00f commit 69cdfdf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/server/mcpserver/test_roots.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async def test_path_outside_roots_raises(tmp_path: Path):
5252
@server.tool("check")
5353
async def check(context: Context, path: str) -> bool:
5454
await context.assert_within_roots(path)
55-
return True
55+
return True # pragma: no cover
5656

5757
callback = _make_callback([Root(uri=FileUrl(f"file://{root_dir}"))])
5858

@@ -74,7 +74,7 @@ async def test_no_roots_declared_raises(tmp_path: Path):
7474
@server.tool("check")
7575
async def check(context: Context, path: str) -> bool:
7676
await context.assert_within_roots(path)
77-
return True
77+
return True # pragma: no cover
7878

7979
callback = _make_callback([])
8080

@@ -103,7 +103,7 @@ async def test_symlink_escaping_root_raises(tmp_path: Path):
103103
@server.tool("check")
104104
async def check(context: Context, path: str) -> bool:
105105
await context.assert_within_roots(path)
106-
return True
106+
return True # pragma: no cover
107107

108108
callback = _make_callback([Root(uri=FileUrl(f"file://{root_dir}"))])
109109

0 commit comments

Comments
 (0)