mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Fix bug in parser and fix unit test
This commit is contained in:
parent
e3bf7a9665
commit
bf4ce2b832
2 changed files with 6 additions and 6 deletions
|
|
@ -202,11 +202,11 @@ def consume_argv():
|
|||
def consume_args(args: list):
|
||||
if (args is sys.argv):
|
||||
yield from consume_argv()
|
||||
|
||||
while len(args) >= 1:
|
||||
value = args[0]
|
||||
del args[0]
|
||||
yield value
|
||||
else:
|
||||
while len(args) >= 1:
|
||||
value = args[0]
|
||||
del args[0]
|
||||
yield value
|
||||
|
||||
# Parse the args from the command line, then from the environment.
|
||||
# Args from the environment are only used if they are not already set from the command line.
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ def test_address_required(cli):
|
|||
|
||||
def test_missing_target(cli):
|
||||
with pytest.raises(ValueError) as ex:
|
||||
cli(["--listen", "8888", "-m", ""])
|
||||
cli(["--listen", "8888"])
|
||||
|
||||
assert "missing target" in str(ex.value)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue