Skip to content

Commit 18442e3

Browse files
committed
Sort single underscore attributes before double attributes in autocomplete
1 parent 599c8b3 commit 18442e3

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

bpython/test/test_autocomplete.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,9 @@ def test_only_completer_returns_None(self):
8888
def test_first_completer_returns_None(self):
8989
a = completer(None)
9090
b = completer(['a'])
91+
print '\n\n\n', b.matches, '\n\n\n'
9192
self.assertEqual(autocomplete.get_completer([a, b], 0, ''), (['a'], b))
9293

93-
def test_completer_shows_single_underscore_before_double(self):
94-
# TODO: do this!
95-
a = completer([])
96-
9794

9895

9996
class TestCumulativeCompleter(unittest.TestCase):
@@ -268,7 +265,6 @@ def __getattr__(self, attr):
268265
self.com.matches(3, 'a._', locals_=locals_))
269266

270267

271-
272268
class TestMagicMethodCompletion(unittest.TestCase):
273269

274270
def test_magic_methods_complete_after_double_underscores(self):
@@ -371,3 +367,6 @@ def func(apple, apricot, banana, carrot):
371367
set(['banana=']))
372368
self.assertSetEqual(com.matches(3, "car", argspec=argspec),
373369
set(['carrot=']))
370+
371+
if __name__ == '__main__':
372+
unittest.main()

0 commit comments

Comments
 (0)