mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add additional `stringify_annotation
` tests (#11027)
This commit is contained in:
parent
d779a1c53e
commit
fca33a203d
@ -446,6 +446,9 @@ def test_stringify_type_union_operator():
|
||||
assert stringify_annotation(int | str | None) == "int | str | None" # type: ignore
|
||||
assert stringify_annotation(int | str | None, "smart") == "int | str | None" # type: ignore
|
||||
|
||||
assert stringify_annotation(int | Struct) == "int | struct.Struct" # type: ignore
|
||||
assert stringify_annotation(int | Struct, "smart") == "int | ~struct.Struct" # type: ignore
|
||||
|
||||
|
||||
def test_stringify_broken_type_hints():
|
||||
assert stringify_annotation(BrokenType, 'fully-qualified-except-typing') == 'tests.test_util_typing.BrokenType'
|
||||
|
Loading…
Reference in New Issue
Block a user