Skip to content

Commit 6551416

Browse files
committed
Improve python API: Adapt tests.
1 parent 8bc7704 commit 6551416

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

test/common.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,10 @@
77
from nose.tools import eq_ as eq
88

99

10-
session = None
11-
vim = None
1210
if 'NVIM_CHILD_ARGV' in os.environ:
13-
argv = json.loads(os.environ['NVIM_CHILD_ARGV'])
14-
session = neovim.child_session(argv)
11+
vim = neovim.attach('child', argv=json.loads(os.environ['NVIM_CHILD_ARGV']))
1512
else:
16-
session = neovim.socket_session(os.environ['NVIM_LISTEN_ADDRESS'])
17-
18-
vim = neovim.Nvim.from_session(session)
13+
vim = neovim.attach('socket', path=os.environ['NVIM_LISTEN_ADDRESS'])
1914

2015
if sys.version_info >= (3, 0):
2116
# For Python3 we decode binary strings as Unicode for compatibility

0 commit comments

Comments
 (0)