Skip to content

Commit 759cfaa

Browse files
authored
Merge branch 'main' into revert-docs-workaround
2 parents 2772a30 + d049d23 commit 759cfaa

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tests/test_debugger.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import sys
22

33
import pytest
4+
from packaging.version import Version
45

56
from .utils import TIMEOUT, get_replies, get_reply, new_kernel
67

@@ -119,7 +120,12 @@ def test_attach_debug(kernel_with_debug):
119120
)
120121
if debugpy:
121122
assert reply["success"]
122-
assert reply["body"]["result"] == ""
123+
# A "repl" evaluate with no frameId hits debugpy's exec path. debugpy < 1.8.21
124+
# reported an empty result there; debugpy >= 1.8.21 reports the actual value.
125+
if Version(debugpy.__version__) >= Version("1.8.21"):
126+
assert reply["body"]["result"] == "ab"
127+
else:
128+
assert reply["body"]["result"] == ""
123129
else:
124130
assert reply == {}
125131

0 commit comments

Comments
 (0)