From da6a6482f18564cc5eb365100d03cd9bc8568427 Mon Sep 17 00:00:00 2001 From: Adam Yoblick Date: Mon, 22 Jul 2024 18:15:29 -0500 Subject: [PATCH] fix broken yield --- src/debugpy/server/cli.py | 2 +- tests/debugpy/server/test_cli.py | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/debugpy/server/cli.py b/src/debugpy/server/cli.py index e9547ecb..64c47308 100644 --- a/src/debugpy/server/cli.py +++ b/src/debugpy/server/cli.py @@ -204,7 +204,7 @@ def consume_argv(): # Consume all the args from a given list def consume_args(args: list): if (args is sys.argv): - return consume_argv() + yield from consume_argv() while len(args) >= 1: value = args[0] diff --git a/tests/debugpy/server/test_cli.py b/tests/debugpy/server/test_cli.py index c081de50..26cad791 100644 --- a/tests/debugpy/server/test_cli.py +++ b/tests/debugpy/server/test_cli.py @@ -73,16 +73,11 @@ def cli(pyfile): # Test a combination of command line switches -#@pytest.mark.parametrize("target_kind", ["file", "module", "code"]) -#@pytest.mark.parametrize("mode", ["listen", "connect"]) -#@pytest.mark.parametrize("address", ["8888", "localhost:8888"]) -#@pytest.mark.parametrize("wait_for_client", ["", "wait_for_client"]) -#@pytest.mark.parametrize("script_args", ["", "script_args"]) -@pytest.mark.parametrize("target_kind", ["file"]) -@pytest.mark.parametrize("mode", ["listen"]) -@pytest.mark.parametrize("address", ["8888"]) -@pytest.mark.parametrize("wait_for_client", ["wait_for_client"]) -@pytest.mark.parametrize("script_args", ["script_args"]) +@pytest.mark.parametrize("target_kind", ["file", "module", "code"]) +@pytest.mark.parametrize("mode", ["listen", "connect"]) +@pytest.mark.parametrize("address", ["8888", "localhost:8888"]) +@pytest.mark.parametrize("wait_for_client", ["", "wait_for_client"]) +@pytest.mark.parametrize("script_args", ["", "script_args"]) def test_targets(cli, target_kind, mode, address, wait_for_client, script_args): expected_options = { "mode": mode,