vim-patch:9.1.0898: runtime(compiler): pytest compiler not included

Problem:  runtime(compiler): pytest compiler not included
Solution: include pytest compiler, update the compiler completion test
          (Konfekt)

closes: vim/vim#16130

3c2596a9e9

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
This commit is contained in:
Christian Clason
2024-11-30 12:08:46 +01:00
committed by Christian Clason
parent 4426a326e2
commit 9d174a7dac
4 changed files with 121 additions and 4 deletions

View File

@@ -3,8 +3,9 @@
" Maintainer: Tom Picton <tom@tompicton.com>
" Previous Maintainer: James Sully <sullyj3@gmail.com>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Change: 2024/05/13
" https://github.com/tpict/vim-ftplugin-python
" Repository: https://github.com/tpict/vim-ftplugin-python
" Last Change: 2024/05/13
" 2024 Nov 30 use pytest compiler (#16130)
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -134,6 +135,11 @@ elseif executable('python')
setlocal keywordprg=python\ -m\ pydoc
endif
if expand('%:t') =~# '\v^test_.*\.py$|_test\.py$' && executable('pytest')
compiler pytest
let &l:makeprg .= ' %:S'
endif
" Script for filetype switching to undo the local stuff we may have changed
let b:undo_ftplugin = 'setlocal cinkeys<'
\ . '|setlocal comments<'
@@ -148,6 +154,7 @@ let b:undo_ftplugin = 'setlocal cinkeys<'
\ . '|setlocal softtabstop<'
\ . '|setlocal suffixesadd<'
\ . '|setlocal tabstop<'
\ . '|setlocal makeprg<'
\ . '|silent! nunmap <buffer> [M'
\ . '|silent! nunmap <buffer> [['
\ . '|silent! nunmap <buffer> []'