Skip to content

Commit fc5f3c5

Browse files
committed
Updated and add tests
1 parent 578073e commit fc5f3c5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_type_utils.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ def test__safe_subclass(candidate, type_, expected):
178178
(pd.Series),
179179
(htypes.column[pd.Series, int]),
180180
(pd.DataFrame),
181+
(typing.Annotated[int, "metadata"]),
181182
],
182183
)
183184
def test_get_type_as_string(type_):
@@ -188,6 +189,12 @@ def test_get_type_as_string(type_):
188189
pytest.fail(f"test get_type_as_string raised: {e}")
189190

190191

192+
def test_type_as_string_with_annotated_type():
193+
"""Tests the custom_subclass_check"""
194+
type_string = htypes.get_type_as_string(typing.Annotated[int, "metadata"]) # type: ignore
195+
assert type_string == "int"
196+
197+
191198
@pytest.mark.parametrize(
192199
"node_type,input_value",
193200
[

0 commit comments

Comments
 (0)