Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4b28cdf

Browse files
committed
Merge remote-tracking branch 'mike/tab-completion-globals' into fix-completions
2 parents 7131c2d + 7f12f6d commit 4b28cdf

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

tests/test_completer.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,6 @@ def _(line, cursor_pos, expect, message, completion):
626626
"Should have completed on a[0].r: %s",
627627
Completion(5, 6, "real"),
628628
)
629-
630629
_(
631630
"a[0].from_",
632631
10,
@@ -746,6 +745,16 @@ class A:
746745
words = completer.get__all__entries(A())
747746
self.assertEqual(words, [])
748747

748+
def test_completes_globals_as_args_of_methods(self):
749+
ip = get_ipython()
750+
c = ip.Completer
751+
c.use_jedi = False
752+
ip.ex("long_variable_name = 1")
753+
ip.ex("a = []")
754+
s, matches = c.complete(None, "a.sort(lo")
755+
self.assertIn("long_variable_name", matches)
756+
757+
749758
def test_func_kw_completions(self):
750759
ip = get_ipython()
751760
c = ip.Completer

0 commit comments

Comments
 (0)