Skip to content

Commit 10ae9f7

Browse files
authored
tests: fix test_vim: assertions, lint (#406)
1 parent bdf8158 commit 10ae9f7

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

test/test_vim.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ def test_command_output(vim):
3737
def test_eval(vim):
3838
vim.command('let g:v1 = "a"')
3939
vim.command('let g:v2 = [1, 2, {"v3": 3}]')
40-
assert vim.eval('g:'), {'v1': 'a', 'v2': [1, 2 == {'v3': 3}]}
40+
assert vim.eval('g:') == {'v1': 'a', 'v2': [1, 2, {'v3': 3}]}
4141

4242

4343
def test_call(vim):
44-
assert vim.funcs.join(['first', 'last'], ', '), 'first == last'
44+
assert vim.funcs.join(['first', 'last'], ', ') == 'first, last'
4545
source(vim, """
4646
function! Testfun(a,b)
4747
return string(a:a).":".a:b
@@ -188,6 +188,7 @@ def test_cwd(vim, tmpdir):
188188
assert cwd_python == cwd_vim
189189
assert cwd_python != cwd_before
190190

191+
191192
lua_code = """
192193
local a = vim.api
193194
local y = ...
@@ -209,10 +210,11 @@ def test_cwd(vim, tmpdir):
209210
return "eggspam"
210211
"""
211212

213+
212214
def test_lua(vim):
213-
assert vim.exec_lua(lua_code, 7) == "eggspam"
214-
assert vim.lua.pynvimtest_func(3) == 10
215-
testmod = vim.lua.pynvimtest
216-
buf = vim.current.buffer
217-
testmod.setbuf(buf, ["a", "b", "c", "d"], async_=True)
218-
assert testmod.getbuf(buf) == 4
215+
assert vim.exec_lua(lua_code, 7) == "eggspam"
216+
assert vim.lua.pynvimtest_func(3) == 10
217+
testmod = vim.lua.pynvimtest
218+
buf = vim.current.buffer
219+
testmod.setbuf(buf, ["a", "b", "c", "d"], async_=True)
220+
assert testmod.getbuf(buf) == 4

0 commit comments

Comments
 (0)