fix(picker): propagate logs with override

This commit is contained in:
Barrett Ruth 2025-09-21 12:26:52 -04:00
parent 373e7f6e76
commit 4f31678a29

View file

@ -167,6 +167,18 @@ describe('cp.scrape', function()
end)
it('handles python environment setup failure', function()
local cache = require('cp.cache')
local utils = require('cp.utils')
cache.load = function() end
cache.get_contest_data = function()
return nil
end
utils.setup_python_env = function()
return false
end
vim.system = function(cmd)
if cmd[1] == 'ping' then
return {
@ -174,12 +186,6 @@ describe('cp.scrape', function()
return { code = 0 }
end,
}
elseif cmd[1] == 'uv' and cmd[2] == 'sync' then
return {
wait = function()
return { code = 1, stderr = 'setup failed' }
end,
}
end
return {
wait = function()
@ -188,10 +194,6 @@ describe('cp.scrape', function()
}
end
vim.fn.isdirectory = function()
return 0
end
local result = scrape.scrape_contest_metadata('atcoder', 'abc123')
assert.is_false(result.success)