summaryrefslogtreecommitdiff
path: root/tests/test_util_typing.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-10-04 22:41:44 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-10-04 22:41:44 +0900
commit598b85da75bc533004d68b95a5056016dc16df1c (patch)
treee08eae0ea5f098257f01081e4c792bcfeb92eba6 /tests/test_util_typing.py
parent11633f2e53bf01f6844256558444991836815690 (diff)
parent38bb3774643d779b708970f941f2b16d1ab81b89 (diff)
downloadsphinx-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.py8
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'