Example #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))
Example #2
0
def GetCompleter_RlsNotFound_test(*args):
    ok_(not GetCompleter(user_options_store.GetAll()))
Example #3
0
def GetCompleter_RlsFound_test():
    ok_(GetCompleter(user_options_store.GetAll()))
Example #4
0
def GetCompleter_RlsFound_test():
    assert_that(GetCompleter(user_options_store.GetAll()))
Example #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?')
Example #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))
Example #7
0
 def test_GetCompleter_RANotFound(self, *args):
     assert_that(not GetCompleter(user_options_store.GetAll()))
Example #8
0
 def test_GetCompleter_RAFound(self):
     assert_that(GetCompleter(user_options_store.GetAll()))
Example #9
0
def GetCompleter_RANotFound_test(*args):
    assert_that(not GetCompleter(user_options_store.GetAll()))
Example #10
0
def GetCompleter_RustcNotDefine_test(*args):
    user_options = user_options_store.GetAll().copy(rls_binary_path='rls')
    ok_(not GetCompleter(user_options))
Example #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)
Example #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'))