Skip to content

Commit

Permalink
Add additional stringify_annotation tests (#11027)
Browse files Browse the repository at this point in the history
  • Loading branch information
hassec committed Jul 28, 2023
1 parent d779a1c commit fca33a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_util_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit fca33a2

Please sign in to comment.