X Tutup
Skip to content

Commit 2bd4a10

Browse files
test changes
1 parent 6cf08ed commit 2bd4a10

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

bpython/autocomplete.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@
6060
def get_completer(cursor_offset, current_line, locals_, argspec, full_code, mode, complete_magic_methods):
6161
"""Returns a list of matches and a class for what kind of completion is happening
6262
63-
If no completion type is relevant, returns None, None"""
63+
If no completion type is relevant, returns None, None
64+
65+
argspec is an output of inspect.getargspec
66+
"""
6467

6568
kwargs = {'locals_':locals_, 'argspec':argspec, 'full_code':full_code,
6669
'mode':mode, 'complete_magic_methods':complete_magic_methods}

bpython/test/test_autocomplete.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
from bpython import autocomplete
22
from functools import partial
3+
import inspect
34

45
import unittest
56

67
class TestSimpleComplete(unittest.TestCase):
78

8-
simple_config = type('', (), {})()
9-
simple_config.autocomplete_mode = autocomplete.SIMPLE
109
complete = partial(autocomplete.complete,
1110
namespace={'zabcdef':1, 'zabcqwe':2, 'ze':3},
1211
config=simple_config)
12+
kwargs = {locals_={'zabcdef':1, 'zabcqwe':2, 'ze':3},
13+
argspec=inspect.getargspec(lambda x: x),
1314

1415
def test_simple_completion(self):
1516
self.assertEqual(self.complete('zab'), ['zabcdef', 'zabcqwe'])

0 commit comments

Comments
 (0)
X Tutup