diff options
| author | William Boman <william@redwill.se> | 2022-10-06 12:46:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-06 12:46:14 +0200 |
| commit | e93a299b1e4972be382bf6c9451df237a26fafce (patch) | |
| tree | c98f5606fd32bf12b5d908ee57e3e39d72f8c635 /tests | |
| parent | chore: update generated code (#518) (diff) | |
| download | mason-e93a299b1e4972be382bf6c9451df237a26fafce.tar mason-e93a299b1e4972be382bf6c9451df237a26fafce.tar.gz mason-e93a299b1e4972be382bf6c9451df237a26fafce.tar.bz2 mason-e93a299b1e4972be382bf6c9451df237a26fafce.tar.lz mason-e93a299b1e4972be382bf6c9451df237a26fafce.tar.xz mason-e93a299b1e4972be382bf6c9451df237a26fafce.tar.zst mason-e93a299b1e4972be382bf6c9451df237a26fafce.zip | |
fix(pip3): expand python3_host_prog path (#519)
Fixes #505.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/mason-core/managers/pip3_spec.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/mason-core/managers/pip3_spec.lua b/tests/mason-core/managers/pip3_spec.lua index 0d78d708..6f78cdb4 100644 --- a/tests/mason-core/managers/pip3_spec.lua +++ b/tests/mason-core/managers/pip3_spec.lua @@ -2,6 +2,7 @@ local mock = require "luassert.mock" local spy = require "luassert.spy" local path = require "mason-core.path" +local a = require "mason-core.async" local pip3 = require "mason-core.managers.pip3" local installer = require "mason-core.installer" local Result = require "mason-core.result" @@ -87,6 +88,22 @@ describe("pip3 manager", function() ) it( + "should expand python3_host_prog path", + async_test(function() + vim.g.python3_host_prog = "~/python3" + local handle = InstallHandleGenerator "dummy" + local ctx = InstallContextGenerator(handle) + ctx.spawn.python = spy.new(mockx.returns {}) + ctx.spawn[vim.env.HOME .. "/python3"] = spy.new(mockx.returns {}) + + installer.run_installer(ctx, pip3.packages { "package" }) + a.scheduler() + vim.g.python3_host_prog = nil + assert.spy(ctx.spawn[vim.env.HOME .. "/python3"]).was_called(1) + end) + ) + + it( "should use install_args from settings", async_test(function() settings.set { |
