Problem:
The embedded neovim fixture instance for testing picks up python3
on the $PATH. This can be different from the current python.
(Example)
$ which python3
/usr/local/bin/python3
$ which python3.11
$HOME/.pyenvs/versions/3.11.5/bin/python3.11
$ python3.11 -m pytest
then neovim will have /usr/local/bin/python3 as the python3 host,
so the behavior of :python (and pynvim especially when it has local
changes during development) can be different.
Solution:
The embedded nvim instance should always pin g:python3_host_prog to
sys.executable.
Problem: The embedded neovim fixture instance for testing picks up
python3
on the$PATH
. This can be different from the current python.(Example)
then neovim will have
/usr/local/bin/python3
as the python3 host, so the behavior of:python
(andpynvim
especially when it has local changes during development) can be different.Solution: The embedded nvim instance should always pin
g:python3_host_prog
tosys.executable
.