Skip to content

Commit b0951cd

Browse files
Test attribute completion on other expressions
1 parent ce0bd0a commit b0951cd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

bpython/test/test_autocomplete.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,16 @@ def __getitem__(inner_self, i):
309309

310310
self.com.matches(5, 'a[0].', locals_={'a': FakeList()})
311311

312+
def test_literals_complete(self):
313+
self.assertSetEqual(self.com.matches(10, '[a][0][0].',
314+
locals_={'a': (Foo(),)}),
315+
set(['method', 'a', 'b']))
316+
317+
def test_dictionaries_complete(self):
318+
self.assertSetEqual(self.com.matches(7, 'a["b"].',
319+
locals_={'a': {'b': Foo()}}),
320+
set(['method', 'a', 'b']))
321+
312322

313323
class TestMagicMethodCompletion(unittest.TestCase):
314324

0 commit comments

Comments
 (0)