Context: I am using vim-dispatch with vim-test to run tests asynchronously with the correct compiler plugin.
In most cases, it works fluently, e.g., for Go files, vim-test will generate a test command go test ... and vim-dispatch will use my after/compiler/gotest.vim plugin to get the errorformat, then populate the quickfix list correctly.
For Python with Pytest as test framework, vim-test uses python -m pytest ... instead of pytest ... (related PR: vim-test/vim-test#608), which seems to confuse vim-dispatch as it does not set the compiler plugin to pytest and pytest's output is not correctly populated to the quickfix list. This can be further verified with:
echo dispatch#compiler_for_program('python3 -m pytest tests/test_server.py') -> ""
echo dispatch#compiler_for_program('pytest tests/test_server.py') -> "pytest"
Could we improve the heuristic logic for pytest?
Context: I am using vim-dispatch with vim-test to run tests asynchronously with the correct compiler plugin.
In most cases, it works fluently, e.g., for Go files, vim-test will generate a test command
go test ...and vim-dispatch will use myafter/compiler/gotest.vimplugin to get the errorformat, then populate the quickfix list correctly.For Python with Pytest as test framework, vim-test uses
python -m pytest ...instead ofpytest ...(related PR: vim-test/vim-test#608), which seems to confuse vim-dispatch as it does not set the compiler plugin to pytest and pytest's output is not correctly populated to the quickfix list. This can be further verified with:echo dispatch#compiler_for_program('python3 -m pytest tests/test_server.py')-> ""echo dispatch#compiler_for_program('pytest tests/test_server.py')-> "pytest"Could we improve the heuristic logic for pytest?