Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-133351: Fix remote PDB's multi-line block tab completion#133387
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -531,6 +531,44 @@ def test_completion_in_pdb_state(self): | ||||||||||||
| expected_state={"state": "pdb"}, | ||||||||||||
| ) | ||||||||||||
| def test_multiline_completion_in_pdb_state(self): | ||||||||||||
| """Test requesting tab completions at a (Pdb) continuation prompt.""" | ||||||||||||
| # GIVEN | ||||||||||||
| incoming = [ | ||||||||||||
Comment on lines +535 to +537 Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Suggested change
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I kind of agree that | ||||||||||||
| ("server", {"prompt": "(Pdb) ", "state": "pdb"}), | ||||||||||||
| ("user", {"prompt": "(Pdb) ", "input": "if True:"}), | ||||||||||||
| ( | ||||||||||||
| "user", | ||||||||||||
| { | ||||||||||||
| "prompt": "... ", | ||||||||||||
| "completion_request": { | ||||||||||||
| "line": " b", | ||||||||||||
| "begidx": 4, | ||||||||||||
| "endidx": 5, | ||||||||||||
| }, | ||||||||||||
| "input": " bool()", | ||||||||||||
| }, | ||||||||||||
| ), | ||||||||||||
| ("server", {"completions": ["bin", "bool", "bytes"]}), | ||||||||||||
| ("user", {"prompt": "... ", "input": ""}), | ||||||||||||
| ] | ||||||||||||
| self.do_test( | ||||||||||||
| incoming=incoming, | ||||||||||||
| expected_outgoing=[ | ||||||||||||
| { | ||||||||||||
| "complete": { | ||||||||||||
| "text": "b", | ||||||||||||
| "line": "! b", | ||||||||||||
| "begidx": 2, | ||||||||||||
| "endidx": 3, | ||||||||||||
| } | ||||||||||||
| }, | ||||||||||||
| {"reply": "if True:\n bool()\n"}, | ||||||||||||
| ], | ||||||||||||
| expected_completions=["bin", "bool", "bytes"], | ||||||||||||
| expected_state={"state": "pdb"}, | ||||||||||||
| ) | ||||||||||||
| def test_completion_in_interact_state(self): | ||||||||||||
| """Test requesting tab completions at a >>> prompt.""" | ||||||||||||
| incoming = [ | ||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Fix remote PDB to correctly request tab completions for Python expressions | ||
| from the server when completing a continuation line of a multi-line Python | ||
| block. |
Uh oh!
There was an error while loading.Please reload this page.