1
0
forked from VimPlug/jedi

failing import tests for #280

This commit is contained in:
David Halter
2013-08-15 14:10:41 +04:30
parent c4e07cae11
commit 6718020fac
2 changed files with 14 additions and 2 deletions

View File

@@ -46,8 +46,16 @@ class TestSetupReadline():
del self.namespace['sys']
del self.namespace['os']
def test_import(self):
assert self.completions('import keyword') == ['keyword']
def test_colorama(self):
"""Only test it if colorama library is available"""
"""
Only test it if colorama library is available.
This module is being tested because it uses ``setattr`` at some point,
which Jedi doesn't understand, but it should still work in the REPL.
"""
try:
# if colorama is installed
import colorama
@@ -56,4 +64,5 @@ class TestSetupReadline():
else:
self.namespace['colorama'] = colorama
assert self.completions('colorama')
assert self.completions('colorama.Fore.BLACK') == ['colorama.Fore.BLACK']
del self.namespace['colorama']