Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions tests/unittests/test_imports.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# The following line should not be removed, as it is used to test the imports in runtime
# noinspection PyUnresolvedReferences
from ai21 import * # noqa: F403
from ai21 import __all__

EXPECTED_ALL = [
"AI21EnvConfig",
"AI21Client",
"AI21APIError",
"APITimeoutError",
"AI21Error",
"MissingApiKeyError",
"ModelPackageDoesntExistError",
"TooManyRequestsError",
"AI21BedrockClient",
"AI21SageMakerClient",
"BedrockModelID",
"SageMaker",
]


def test_all_imports() -> None:
assert sorted(EXPECTED_ALL) == sorted(__all__)