-
-
Notifications
You must be signed in to change notification settings - Fork 685
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: resolve type checking and linting issues
- Loading branch information
1 parent
4360508
commit e2cccf6
Showing
3 changed files
with
8 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
from typing import Any | ||
from typing import Any, cast | ||
from typer.testing import CliRunner, Result | ||
from instructor.cli.deprecated_hub import app | ||
from typer import Typer | ||
|
||
runner: CliRunner = CliRunner() | ||
|
||
def test_deprecated_hub_command() -> None: | ||
"""Test that the hub command returns a deprecation message and exits with code 1""" | ||
result: Result[Any] = runner.invoke(app) | ||
result = cast(Result[Any], runner.invoke(app)) | ||
assert result.exit_code == 1 | ||
assert "instructor hub has been deprecated" in result.stdout | ||
assert "https://python.useinstructor.com/examples/" in result.stdout |