Skip to content

Commit 72be2cd

Browse files
committed
Failing test for #544
1 parent 811dff1 commit 72be2cd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

bpython/test/test_autocomplete.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
from bpython._py3compat import py3
2121
from bpython.test import mock
2222

23-
if sys.version_info[:2] >= (3, 4):
23+
is_py34 = sys.version_info[:2] >= (3, 4)
24+
if is_py34:
2425
glob_function = 'glob.iglob'
2526
else:
2627
glob_function = 'glob.glob'
@@ -308,6 +309,13 @@ def test_completions_starting_with_different_cases(self):
308309
[Comp('Abc', 'bc'), Comp('ade', 'de')])
309310
self.assertSetEqual(matches, set(['ade']))
310311

312+
@unittest.skipUnless(is_py34, 'asyncio required')
313+
def test_issue_544(self):
314+
com = autocomplete.MultilineJediCompletion()
315+
code = '@asyncio.coroutine\ndef'
316+
history = ('import asyncio', '@asyncio.coroutin')
317+
com.matches(3, 'def', current_block=code, history=history)
318+
311319

312320
class TestGlobalCompletion(unittest.TestCase):
313321

0 commit comments

Comments
 (0)