Skip to content

Commit 26855aa

Browse files
authored
Merge pull request #279 from dapper91/extra-tests
get_type_hints tests added.
2 parents 43c45b4 + 9ede969 commit 26855aa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_misc.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,3 +406,13 @@ class TestModel(BaseXmlModel, tag='root'):
406406

407407
with pytest.raises(pd.ValidationError):
408408
TestModel.from_xml("<root><elm>-1</elm></root>")
409+
410+
411+
def test_get_type_hints():
412+
from typing import get_type_hints
413+
414+
class TestModel(BaseXmlModel, tag="model"):
415+
int_val: int = element()
416+
417+
hints = get_type_hints(TestModel)
418+
assert isinstance(hints, dict)

0 commit comments

Comments
 (0)