mirror of
https://github.com/neovim/neovim.git
synced 2025-11-25 19:50:45 +00:00
test: python: report pending() if python{2,3} is missing
This commit is contained in:
@@ -1,19 +1,19 @@
|
|||||||
do
|
do
|
||||||
local proc =
|
local proc = io.popen(
|
||||||
io.popen([[python3 -c 'import neovim, sys; sys.stdout.write("ok")' 2> /dev/null]])
|
[[python3 -c 'import neovim, sys; sys.stdout.write("ok")' 2> /dev/null]])
|
||||||
if proc:read() ~= 'ok' then
|
if proc:read() ~= 'ok' then
|
||||||
-- Don't run these tests if python3 is not available
|
pending(
|
||||||
|
'python3 (or the python3 neovim module) is broken or missing',
|
||||||
|
function() end)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local eval, command, feed = helpers.eval, helpers.command, helpers.feed
|
local eval, command, feed = helpers.eval, helpers.command, helpers.feed
|
||||||
local eq, clear, insert = helpers.eq, helpers.clear, helpers.insert
|
local eq, clear, insert = helpers.eq, helpers.clear, helpers.insert
|
||||||
local expect, write_file = helpers.expect, helpers.write_file
|
local expect, write_file = helpers.expect, helpers.write_file
|
||||||
|
|
||||||
|
|
||||||
describe('python3 commands and functions', function()
|
describe('python3 commands and functions', function()
|
||||||
before_each(function()
|
before_each(function()
|
||||||
clear()
|
clear()
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
do
|
do
|
||||||
local proc =
|
local proc = io.popen(
|
||||||
io.popen([[python -c 'import neovim, sys; sys.stdout.write("ok")' 2> /dev/null]])
|
[[python -c 'import neovim, sys; sys.stdout.write("ok")' 2> /dev/null]])
|
||||||
if proc:read() ~= 'ok' then
|
if proc:read() ~= 'ok' then
|
||||||
-- Don't run these tests if python is not available
|
pending(
|
||||||
|
'python (or the python neovim module) is broken or missing',
|
||||||
|
function() end)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local eval, command, feed = helpers.eval, helpers.command, helpers.feed
|
local eval, command, feed = helpers.eval, helpers.command, helpers.feed
|
||||||
local eq, clear, insert = helpers.eq, helpers.clear, helpers.insert
|
local eq, clear, insert = helpers.eq, helpers.clear, helpers.insert
|
||||||
local expect, write_file = helpers.expect, helpers.write_file
|
local expect, write_file = helpers.expect, helpers.write_file
|
||||||
|
|
||||||
|
|
||||||
describe('python commands and functions', function()
|
describe('python commands and functions', function()
|
||||||
before_each(function()
|
before_each(function()
|
||||||
clear()
|
clear()
|
||||||
|
|||||||
Reference in New Issue
Block a user