This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds debug console completion (#772)
* Add support for debug console completion * Add test files * Adding tests * Add supportsCompletionsRequest to _requests * Add test for bad request * Fix sorting issue in test * Address comments * Remove unsupported test for completions * Add required argument to completions request in tests * Fix linter issues
- Loading branch information
1 parent
f453ed1
commit df9c8fd
Showing
6 changed files
with
379 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
tests/resources/system_tests/test_completions/attach_completions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import sys | ||
import ptvsd | ||
|
||
ptvsd.enable_attach((sys.argv[1], sys.argv[2])) | ||
ptvsd.wait_for_attach() | ||
|
||
|
||
class SomeClass(): | ||
def __init__(self, someVar): | ||
self.some_var = someVar | ||
|
||
def do_someting(self): | ||
someVariable = self.some_var | ||
return someVariable | ||
|
||
|
||
def someFunction(someVar): | ||
someVariable = someVar | ||
return SomeClass(someVariable).do_someting() | ||
|
||
|
||
someFunction('value') | ||
print('done') |
16 changes: 16 additions & 0 deletions
16
tests/resources/system_tests/test_completions/launch_completions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
class SomeClass(): | ||
def __init__(self, someVar): | ||
self.some_var = someVar | ||
|
||
def do_someting(self): | ||
someVariable = self.some_var | ||
return someVariable | ||
|
||
|
||
def someFunction(someVar): | ||
someVariable = someVar | ||
return SomeClass(someVariable).do_someting() | ||
|
||
|
||
someFunction('value') | ||
print('done') |
Oops, something went wrong.