From 814998253aa6d2d24ba0aa18ece2b3e1a0aba427 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 2 Aug 2019 13:44:04 +0200 Subject: [PATCH] Fix Python 2 test issues --- test/test_api/test_signatures.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_api/test_signatures.py b/test/test_api/test_signatures.py index cd86fd87..3d3e73ac 100644 --- a/test/test_api/test_signatures.py +++ b/test/test_api/test_signatures.py @@ -18,7 +18,7 @@ _tuple_code = 'from typing import Tuple\ndef f(x: Tuple[int]): ...\nf' ('def f(*args: int, **kwargs: str): ...\nf', ['class int', 'class str'], False), ] ) -def test_param_annotation(Script, code, expected_params, execute_annotation): +def test_param_annotation(Script, code, expected_params, execute_annotation, skip_python2): func, = Script(code).goto_assignments() sig, = func.get_signatures() for p, expected in zip(sig.params, expected_params): @@ -32,9 +32,9 @@ def test_param_annotation(Script, code, expected_params, execute_annotation): @pytest.mark.parametrize( 'code, expected_params', [ - ('def f(x=1, y=int, z): ...\nf', ['instance int', 'class int', None]), - ('def f(*args, **kwargs): ...\nf', [None, None]), - ('x=1\ndef f(p=x): ...\nx=""\nf', ['instance int']), + ('def f(x=1, y=int, z): pass\nf', ['instance int', 'class int', None]), + ('def f(*args, **kwargs): pass\nf', [None, None]), + ('x=1\ndef f(p=x): pass\nx=""\nf', ['instance int']), ] ) def test_param_default(Script, code, expected_params):