Skip to content

Commit efb11cc

Browse files
committed
Add test for completion in strings/Python dictionaries
1 parent 8a16869 commit efb11cc

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

atest/05_Features/Completion.robot

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,24 @@ Works After Kernel Restart In New Cells
102102
Works In File Editor
103103
[Setup] Prepare File for Editing Python completion completion.py
104104
Place Cursor In File Editor At 9 2
105-
Capture Page Screenshot 01-editor-ready.png
105+
Wait Until Fully Initialized
106106
Trigger Completer
107107
Completer Should Suggest add
108108
[Teardown] Clean Up After Working With File completion.py
109109

110+
Completes In Strings Or Python Dictionaries
111+
[Setup] Prepare File for Editing Python completion completion.py
112+
Place Cursor In File Editor At 16 0
113+
Wait Until Fully Initialized
114+
Press Keys None test_dict['']
115+
Place Cursor In File Editor At 16 11
116+
Trigger Completer
117+
# note: in jedi-language-server this would be key_a without '
118+
Completer Should Suggest 'key_a
119+
Select Completer Suggestion 'key_a
120+
Wait Until Keyword Succeeds 40x 0.5s File Editor Line Should Equal 15 test_dict['key_a']
121+
[Teardown] Clean Up After Working With File completion.py
122+
110123
Continious Hinting Works
111124
Configure JupyterLab Plugin {"continuousHinting": true} plugin id=${COMPLETION PLUGIN ID}
112125
Prepare File for Editing Python completion completion.py

atest/examples/completion.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,10 @@ def add(a: int, b: int):
66
return a, b
77

88

9-
ad
9+
ad
10+
11+
12+
test_dict = {
13+
'key_a': 1,
14+
'key_b': 2
15+
}

0 commit comments

Comments
 (0)