diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-10-04 22:41:44 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-10-04 22:41:44 +0900 |
commit | 598b85da75bc533004d68b95a5056016dc16df1c (patch) | |
tree | e08eae0ea5f098257f01081e4c792bcfeb92eba6 /tests/test_util_typing.py | |
parent | 11633f2e53bf01f6844256558444991836815690 (diff) | |
parent | 38bb3774643d779b708970f941f2b16d1ab81b89 (diff) | |
download | sphinx-git-598b85da75bc533004d68b95a5056016dc16df1c.tar.gz |
Merge branch '3.x' into master
Diffstat (limited to 'tests/test_util_typing.py')
-rw-r--r-- | tests/test_util_typing.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_util_typing.py b/tests/test_util_typing.py index 932fdbfc0..3f8ddbb37 100644 --- a/tests/test_util_typing.py +++ b/tests/test_util_typing.py @@ -32,6 +32,10 @@ class MyList(List[T]): pass +class BrokenType: + __args__ = int + + def test_stringify(): assert stringify(int) == "int" assert stringify(str) == "str" @@ -113,3 +117,7 @@ def test_stringify_type_hints_alias(): MyTuple = Tuple[str, str] assert stringify(MyStr) == "str" assert stringify(MyTuple) == "Tuple[str, str]" # type: ignore + + +def test_stringify_broken_type_hints(): + assert stringify(BrokenType) == 'test_util_typing.BrokenType' |