Commit 33e01738 authored by Josh Tobin's avatar Josh Tobin

posonly: fix test for some python versions

parent 24941cb7
...@@ -122,9 +122,9 @@ def test_use_positional_as_keyword2(a, /, b): ...@@ -122,9 +122,9 @@ def test_use_positional_as_keyword2(a, /, b):
def test_use_positional_as_keyword3(a, b, /): def test_use_positional_as_keyword3(a, b, /):
""" """
>>> test_use_positional_as_keyword3(1, 2) >>> test_use_positional_as_keyword3(1, 2)
>>> test_use_positional_as_keyword3(a=1, b=2) >>> test_use_positional_as_keyword3(a=1, b=2) # doctest:+ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
TypeError: test_use_positional_as_keyword3() got an unexpected keyword argument 'a' TypeError: test_use_positional_as_keyword3() got an unexpected keyword argument '...'
""" """
def test_positional_only_and_arg_invalid_calls(a, b, /, c): def test_positional_only_and_arg_invalid_calls(a, b, /, c):
...@@ -363,9 +363,9 @@ def test_serialization1(a, b, /): ...@@ -363,9 +363,9 @@ def test_serialization1(a, b, /):
>>> unpickled_posonly = pickle.loads(pickled_posonly) >>> unpickled_posonly = pickle.loads(pickled_posonly)
>>> unpickled_posonly(1, 2) >>> unpickled_posonly(1, 2)
(1, 2) (1, 2)
>>> unpickled_posonly(a=1, b=2) >>> unpickled_posonly(a=1, b=2) # doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
TypeError: test_serialization1() got an unexpected keyword argument 'a' TypeError: test_serialization1() got an unexpected keyword argument '...'
""" """
return (a, b) return (a, b)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment