mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-23 14:04:18 +02:00
Enable more type checking rules (#1775)
This commit is contained in:
parent
3dd7373680
commit
fe4f31c2c7
36 changed files with 404 additions and 177 deletions
|
|
@ -32,6 +32,7 @@ class TestMainCLI:
|
|||
"""Test parsing invalid environment variables exits."""
|
||||
with pytest.raises(SystemExit) as exc_info:
|
||||
_parse_env_var("INVALID_FORMAT")
|
||||
assert isinstance(exc_info.value, SystemExit)
|
||||
assert exc_info.value.code == 1
|
||||
|
||||
|
||||
|
|
@ -47,14 +48,14 @@ class TestVersionCommand:
|
|||
def test_version_command_parsing(self):
|
||||
"""Test that the version command parses arguments correctly."""
|
||||
command, bound, _ = app.parse_args(["version"])
|
||||
assert command.__name__ == "version"
|
||||
assert command.__name__ == "version" # type: ignore[attr-defined]
|
||||
# Default arguments aren't included in bound.arguments
|
||||
assert bound.arguments == {}
|
||||
|
||||
def test_version_command_with_copy_flag(self):
|
||||
"""Test that the version command parses --copy flag correctly."""
|
||||
command, bound, _ = app.parse_args(["version", "--copy"])
|
||||
assert command.__name__ == "version"
|
||||
assert command.__name__ == "version" # type: ignore[attr-defined]
|
||||
assert bound.arguments == {"copy": True}
|
||||
|
||||
@patch("fastmcp.cli.cli.pyperclip.copy")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue