def Start(self): """Starts Neovim""" self.process = subprocess.Popen(self.start_command, env=self.env) start_time = time.time() # Wait at most 5s for the Neovim socket while not os.path.exists(self.args.servername) and time.time() - start_time < 5: time.sleep(0.01) self.conn = neovim.connect(self.args.servername)
def Start(self): """Starts Neovim""" self.process = subprocess.Popen(self.start_command, env=self.env) start_time = time.time() # Wait at most 5s for the Neovim socket while not os.path.exists(self.args.servername) \ and time.time() - start_time < 5: time.sleep(0.01) self.conn = neovim.connect(self.args.servername)
from nose.tools import eq_ as eq import neovim, os vim = neovim.connect(os.environ['NEOVIM_LISTEN_ADDRESS']) def cleanup(): # cleanup nvim vim.command('call BeforeEachTest()') eq(len(vim.tabpages), 1) eq(len(vim.windows), 1) eq(len(vim.buffers), 1)