summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pdb.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_pdb.py')
-rw-r--r--Lib/test/test_pdb.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
index 9328cca..4f4a569 100644
--- a/Lib/test/test_pdb.py
+++ b/Lib/test/test_pdb.py
@@ -1673,6 +1673,32 @@ def test_pdb_issue_gh_101517():
(Pdb) continue
"""
+def test_pdb_issue_gh_103225():
+ """See GH-103225
+
+ Make sure longlist uses 1-based line numbers in frames that correspond to a module
+
+ >>> with PdbTestInput([ # doctest: +NORMALIZE_WHITESPACE
+ ... 'longlist',
+ ... 'continue'
+ ... ]):
+ ... a = 1
+ ... import pdb; pdb.Pdb(nosigint=True, readrc=False).set_trace()
+ ... b = 2
+ > <doctest test.test_pdb.test_pdb_issue_gh_103225[0]>(7)<module>()
+ -> b = 2
+ (Pdb) longlist
+ 1 with PdbTestInput([ # doctest: +NORMALIZE_WHITESPACE
+ 2 'longlist',
+ 3 'continue'
+ 4 ]):
+ 5 a = 1
+ 6 import pdb; pdb.Pdb(nosigint=True, readrc=False).set_trace()
+ 7 -> b = 2
+ (Pdb) continue
+ """
+
+
@support.requires_subprocess()
class PdbTestCase(unittest.TestCase):
def tearDown(self):