Skip to content

Commit 56c9fd0

Browse files
dpellebrammool
authored andcommitted
patch 8.2.2872: Python tests fail without the channel feature
Problem: Python tests fail without the channel feature. Solution: Add a feature check. (Dominique Pellé, closes #8226)
1 parent 4781d6f commit 56c9fd0

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

src/testdir/test_python2.vim

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -814,8 +814,12 @@ func Test_python_vim_bindeval()
814814
call assert_equal(v:none, pyeval("vim.bindeval('v:none')"))
815815

816816
" channel/job
817-
call assert_equal(v:none, pyeval("vim.bindeval('test_null_channel()')"))
818-
call assert_equal(v:none, pyeval("vim.bindeval('test_null_job()')"))
817+
if has('channel')
818+
call assert_equal(v:none, pyeval("vim.bindeval('test_null_channel()')"))
819+
endif
820+
if has('job')
821+
call assert_equal(v:none, pyeval("vim.bindeval('test_null_job()')"))
822+
endif
819823
endfunc
820824

821825
" threading

src/testdir/test_python3.vim

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,8 +1007,12 @@ func Test_python3_vim_bindeval()
10071007
call assert_equal(v:none, py3eval("vim.bindeval('v:none')"))
10081008

10091009
" channel/job
1010-
call assert_equal(v:none, py3eval("vim.bindeval('test_null_channel()')"))
1011-
call assert_equal(v:none, py3eval("vim.bindeval('test_null_job()')"))
1010+
if has('channel')
1011+
call assert_equal(v:none, py3eval("vim.bindeval('test_null_channel()')"))
1012+
endif
1013+
if has('job')
1014+
call assert_equal(v:none, py3eval("vim.bindeval('test_null_job()')"))
1015+
endif
10121016
endfunc
10131017

10141018
" threading

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2872,
753755
/**/
754756
2871,
755757
/**/

0 commit comments

Comments
 (0)