Fix problem with lineno being none when generating traceback #1750
Azure Pipelines / debugpy-test
failed
Dec 2, 2024 in 42m 20s
Build #20241202.2 had test failures
Details
- Failed: 2 (0.01%)
- Passed: 16,163 (82.33%)
- Other: 3,466 (17.66%)
- Total: 19,631
Annotations
Check failure on line 1109 in Build log
azure-pipelines / debugpy-test
Build log #L1109
PowerShell exited with code '1'.
Check failure on line 1 in test_set_expression[program-launch]
azure-pipelines / debugpy-test
test_set_expression[program-launch]
failed on setup with "worker 'gw5' crashed while running 'tests/debugpy/test_evaluate.py::test_set_expression[program-launch]'"
Raw output
worker 'gw5' crashed while running 'tests/debugpy/test_evaluate.py::test_set_expression[program-launch]'
Check failure on line 1 in test_shell_expansion[expand-launch(console=integratedTerminal)-code]
azure-pipelines / debugpy-test
test_shell_expansion[expand-launch(console=integratedTerminal)-code]
debugpy.common.messaging.NoMoreMessages: No more messages
Raw output
pyfile = <function pyfile.<locals>.factory at 0x0000024B44B94A40>
target = <class 'tests.debug.targets.Code'>
run = launch(console=integratedTerminal), expansion = 'expand'
@pytest.mark.parametrize("target", targets.all)
@pytest.mark.parametrize("run", runners.all_launch)
@pytest.mark.parametrize("expansion", ["preserve", "expand"])
def test_shell_expansion(pyfile, target, run, expansion):
if expansion == "expand" and run.console == "internalConsole":
pytest.skip('Shell expansion is not supported for "internalConsole"')
@pyfile
def code_to_debug():
import sys
import debuggee
from debuggee import backchannel
debuggee.setup()
backchannel.send(sys.argv)
def expand(args):
if expansion != "expand":
return
log.info("Before expansion: {0}", args)
for i, arg in enumerate(args):
if arg.startswith("$"):
args[i] = arg[1:]
log.info("After expansion: {0}", args)
class Session(debug.Session):
def run_in_terminal(self, args, cwd, env):
expand(args)
return super().run_in_terminal(args, cwd, env)
argslist = ["0", "$1", "2"]
args = argslist if expansion == "preserve" else " ".join(argslist)
with Session() as session:
backchannel = session.open_backchannel()
> with run(session, target(code_to_debug, args=args)):
tests\debugpy\test_args.py:69:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\debug\runners.py:82: in __call__
return f(session, target, *self._args, **self._kwargs)
tests\debug\runners.py:148: in launch
return session.request_launch()
tests\debug\session.py:713: in request_launch
return self._request_start("launch")
tests\debug\session.py:672: in _request_start
start_request.response.result # raise exception if failed
tests\timeline.py:1115: in result
return self.message.result
.tox\py312\Lib\site-packages\debugpy\common\messaging.py:909: in result
raise self.body
.tox\py312\Lib\site-packages\debugpy\common\messaging.py:1296: in _parse_incoming_messages
self._parse_incoming_message()
.tox\py312\Lib\site-packages\debugpy\common\messaging.py:1364: in _parse_incoming_message
message_dict = self.stream.read_json(decoder)
.tox\py312\Lib\site-packages\debugpy\common\messaging.py:208: in read_json
line = read_line()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = JsonIOStream('Adapter[1]'), reader = <_io.FileIO [closed]>
def _read_line(self, reader):
line = b""
while True:
try:
line += reader.readline()
except Exception as exc:
raise NoMoreMessages(str(exc), stream=self)
if not line:
> raise NoMoreMessages(stream=self)
E debugpy.common.messaging.NoMoreMessages: No more messages
.tox\py312\Lib\site-packages\debugpy\common\messaging.py:172: NoMoreMessages
Loading