Closed fnune closed 1 year ago
Thanks for the issue @fnune! Hmm, so pytest --fixtures -v
takes more than 5 seconds for you?
Actually, a very strange thing is happening, thanks for prompting me to do this: pytest --fixtures -v
says the timeout is 300s, and runs for that long if I don't send a signal to it. But if I do send a signal and I do it within 1-2 seconds, then the command succeeds (?!).
I'll try to figure this out and post a solution here in case it helps anyone else. It seems like it's not a problem with nvim-pytrize
, so I'll close this. Thanks!
Looks like the weirdness I'm seeing is because I have a bunch of py-packages and I'm running pytest
at the top level. If I run pytest --fixtures -v
from the pytest-specific directory (where conftest.py
lives) things work fine.
I wonder: can nvim-pytrize
run pytest --fixtures -v
(or whatever it runs under the hood) using as a CWD the directory of the closest conftest.py
instead of Neovim's CWD?
@fnune, so basically check upwards in the file hierarchy from the current file?
Yes, going up from the current file up to Neovim's cwd
perhaps.
I can try to work on this once I find some time. Maybe it's not a problem many people are running into.
I think that would make sense :+1:
Cool that would be great! I guess one could use vim.fs.parents()
for that :)
Perhaps make it configurable, and ideally support showing a loading status. This may be easier with some sort of LSP integration, see https://github.com/AckslD/nvim-pytrize.lua/issues/7
Note that even if I do get this error message,
PytrizeJumpFixture
still (somehow) does its job and lands me on the fixture definition.I'm on commit https://github.com/AckslD/nvim-pytrize.lua/commit/250bef11f9c7ee955e12727581747f651cb03af1 (the latest as of today).