Exemplo n.º 1
0
 def test_GetCompleter_RAFromUserOption(self, *args):
     user_options = user_options_store.GetAll().copy(
         rust_toolchain_root='rust-analyzer')
     assert_that(
         GetCompleter(user_options)._rust_root, equal_to('rust-analyzer'))
     expected = os.path.join('rust-analyzer', 'bin', 'rust-analyzer')
     assert_that(GetCompleter(user_options)._ra_path, equal_to(expected))
Exemplo n.º 2
0
def GetCompleter_RlsNotFound_test(*args):
    ok_(not GetCompleter(user_options_store.GetAll()))
Exemplo n.º 3
0
def GetCompleter_RlsFound_test():
    ok_(GetCompleter(user_options_store.GetAll()))
Exemplo n.º 4
0
def GetCompleter_RlsFound_test():
    assert_that(GetCompleter(user_options_store.GetAll()))
Exemplo n.º 5
0
 def test_GetCompleter_WarnsAboutOldConfig(self, logger):
     user_options = user_options_store.GetAll().copy(
         rls_binary_path='/does/not/exist')
     GetCompleter(user_options)
     logger.warning.assert_called_with(
         'rls_binary_path detected. Did you mean rust_toolchain_root?')
Exemplo n.º 6
0
 def test_GetCompleter_InvalidRustRootFromUser(self, *args):
     user_options = user_options_store.GetAll().copy(
         rust_toolchain_root='/does/not/exist')
     assert_that(not GetCompleter(user_options))
Exemplo n.º 7
0
 def test_GetCompleter_RANotFound(self, *args):
     assert_that(not GetCompleter(user_options_store.GetAll()))
Exemplo n.º 8
0
 def test_GetCompleter_RAFound(self):
     assert_that(GetCompleter(user_options_store.GetAll()))
Exemplo n.º 9
0
def GetCompleter_RANotFound_test(*args):
    assert_that(not GetCompleter(user_options_store.GetAll()))
Exemplo n.º 10
0
def GetCompleter_RustcNotDefine_test(*args):
    user_options = user_options_store.GetAll().copy(rls_binary_path='rls')
    ok_(not GetCompleter(user_options))
Exemplo n.º 11
0
def GetCompleter_RlsFromUserOption_test(*args):
    user_options = user_options_store.GetAll().copy(rls_binary_path='rls')
    user_options = user_options.copy(rustc_binary_path='rustc')
    eq_('rls', GetCompleter(user_options)._rls_binary_path)
    eq_('rustc', GetCompleter(user_options)._rustc_binary_path)
Exemplo n.º 12
0
def GetCompleter_RlsFromUserOption_test(*args):
    user_options = user_options_store.GetAll().copy(rls_binary_path='rls')
    user_options = user_options.copy(rustc_binary_path='rustc')
    assert_that(GetCompleter(user_options)._rls_path, equal_to('rls'))
    assert_that(GetCompleter(user_options)._rustc_path, equal_to('rustc'))