Skip to content

Commit

Permalink
Merge pull request #9221 from tk0miya/fix_py36_inspect
Browse files Browse the repository at this point in the history
Fix test: the result of stringify_signature() has been changed randomly in py36
  • Loading branch information
tk0miya authored May 12, 2021
2 parents 415e255 + d18840b commit bde1816
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 bde1816

Please sign in to comment.