Skip to content

Commit

Permalink
Fix test: the result of stringify_signature() has been changed random…
Browse files Browse the repository at this point in the history
…ly in py36
  • Loading branch information
tk0miya committed May 12, 2021
1 parent 415e255 commit d18840b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_util_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,11 @@ def test_signature_annotations():

# optional union
sig = inspect.signature(f20)
assert stringify_signature(sig) == '() -> Optional[Union[int, str]]'
if sys.version_info < (3, 7):
assert stringify_signature(sig) in ('() -> Optional[Union[int, str]]',
'() -> Optional[Union[str, int]]')
else:
assert stringify_signature(sig) == '() -> Optional[Union[int, str]]'

# Any
sig = inspect.signature(f14)
Expand Down

0 comments on commit d18840b

Please sign in to comment.