Skip to content

gh-110944: Make pdb completion work for alias and convenience vars #110945

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into pdb-complete
  • Loading branch information
encukou authored Nov 13, 2023
commit fbc6f23eac1ad37c20cb4bb6e0253c856eaa7c5c
8 changes: 6 additions & 2 deletions Lib/test/test_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -3274,16 +3274,20 @@ def setUpClass():
def test_basic_completion(self):
script = textwrap.dedent("""
import pdb; pdb.Pdb().set_trace()
print('hello')
# Concatenate strings so that the output doesn't appear in the source
print('hello' + '!')
""")

# List everything starting with 'co', there should be multiple matches
# then add ntin and complete 'contin' to 'continue'
input = b"co\t\tntin\t\n"

output = run_pty(script, input)

self.assertIn(b'cont', output)
self.assertIn(b'commands', output)
self.assertIn(b'condition', output)
self.assertIn(b'continue', output)
self.assertIn(b'hello!', output)

def test_expression_completion(self):
script = textwrap.dedent("""
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.