From b50f1bcc48bb944704c586b462a5e9d5cdf0d532 Mon Sep 17 00:00:00 2001 From: numirias Date: Tue, 1 Oct 2019 09:01:23 +0200 Subject: [PATCH] Fix testing and lint --- rplugin/python3/semshi/handler.py | 2 +- test/data/test.vimrc | 2 ++ test/test_plugin.py | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rplugin/python3/semshi/handler.py b/rplugin/python3/semshi/handler.py index 50d5660..21558c1 100644 --- a/rplugin/python3/semshi/handler.py +++ b/rplugin/python3/semshi/handler.py @@ -144,7 +144,7 @@ def _update_loop(self): self._add_visible_hls() self._viewport_changed = False except Exception: - import traceback + import traceback # pylint: disable=import-outside-toplevel logger.error('Exception: %s', traceback.format_exc()) raise diff --git a/test/data/test.vimrc b/test/data/test.vimrc index ffd9712..9e433ac 100644 --- a/test/data/test.vimrc +++ b/test/data/test.vimrc @@ -3,3 +3,5 @@ let &runtimepath .= ',' . getcwd() . '/test/helperplugin' set noswapfile set hidden +set viminfo="NONE" +set shada="NONE" diff --git a/test/test_plugin.py b/test/test_plugin.py index 8ea12d6..72833b7 100644 --- a/test/test_plugin.py +++ b/test/test_plugin.py @@ -20,7 +20,7 @@ def plugin_dir(tmpdir_factory): @pytest.fixture(scope='module', autouse=True) def register_plugin(plugin_dir): os.environ['NVIM_RPLUGIN_MANIFEST'] = str(plugin_dir.join('rplugin.vim')) - child_argv = ['nvim', '-u', VIMRC, '--embed'] + child_argv = ['nvim', '-u', VIMRC, '--embed', '--headless'] vim = neovim.attach('child', argv=child_argv) vim.command('UpdateRemotePlugins') vim.quit() @@ -69,7 +69,7 @@ def wait_for_update_thread(self): @pytest.fixture(scope='function') def vim(): - argv = ['nvim', '-u', VIMRC, '--embed'] + argv = ['nvim', '-u', VIMRC, '--embed', '--headless'] vim = neovim.attach('child', argv=argv) return WrappedVim(vim) @@ -77,7 +77,7 @@ def vim(): def start_vim(argv=None, file=None): if argv is None: argv = [] - argv = ['nvim', '-u', VIMRC, '--embed', *argv] + argv = ['nvim', '-u', VIMRC, '--embed', '--headless', *argv] vim = neovim.attach('child', argv=argv) if file is not None: fn = file or '/tmp/foo.py' # TODO Use relaible tmp path