def build_script(vim_client_script): """make path to scripts used by tests """ from vimpdb.proxy import getPackagePath tests_path = getPackagePath(build_script) script_path = sys.executable + " " + os.path.sep.join([tests_path, 'scripts', vim_client_script]) return script_path
def test_ProxyToVim_showFileAtLine_existing_file(): from vimpdb.testing import ProxyToVimForTests from vimpdb.proxy import getPackagePath to_vim = ProxyToVimForTests() to_vim.setState(to_vim.IS_REMOTE_SETUP_IS_TRUE) existingFile = getPackagePath(test_ProxyToVim_showFileAtLine_existing_file) to_vim.showFileAtLine(existingFile, 1) lines = to_vim.logged().splitlines() assert len(lines) == 4 assert lines[1] == "expr: exists('*PDB_init')" assert lines[2] == "return: '1'" assert lines[3].startswith('send: :call PDB_show_file_at_line("') assert lines[3].endswith(' "1")<CR>') assert not '\\' in lines[3]