Skip to content

Commit 9c5c04d

Browse files
committed
test: check imports
1 parent 9551776 commit 9c5c04d

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

ai21/clients/sagemaker/resources/sagemaker_completion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from __future__ import annotations
1+
# from __future__ import annotations
22

33
from typing import List, Dict
44

tests/unittests/test_imports.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from ai21 import __all__
2+
from ai21 import * # noqa: F403
3+
4+
EXPECTED_ALL = [
5+
"AI21EnvConfig",
6+
"AI21Client",
7+
"AI21APIError",
8+
"APITimeoutError",
9+
"AI21Error",
10+
"MissingApiKeyError",
11+
"ModelPackageDoesntExistError",
12+
"TooManyRequestsError",
13+
"AI21BedrockClient",
14+
"AI21SageMakerClient",
15+
"BedrockModelID",
16+
"SageMaker",
17+
]
18+
19+
20+
def test_all_imports() -> None:
21+
assert sorted(EXPECTED_ALL) == sorted(__all__)

0 commit comments

Comments
 (0)