summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-12-22 12:50:10 +0100
committerBram Moolenaar <Bram@vim.org>2020-12-22 12:50:10 +0100
commit07761a3b965ec3be0c8d52aae9b6dc09c2127d27 (patch)
treeda9460cfef04e538f77c49cd0ec77a29a763ed83
parent5b3d1bb0f5180266c4de4d815b3ea856a2fb3519 (diff)
downloadvim-git-07761a3b965ec3be0c8d52aae9b6dc09c2127d27.tar.gz
patch 8.2.2187: Python 3 test fails sometimesv8.2.2187
Problem: Python 3 test fails sometimes. (Christian Brabandt) Solution: Accept two SystemError messages.
-rw-r--r--src/testdir/test_python3.vim11
-rw-r--r--src/version.c2
2 files changed, 8 insertions, 5 deletions
diff --git a/src/testdir/test_python3.vim b/src/testdir/test_python3.vim
index 1a86a7e97..7765071b2 100644
--- a/src/testdir/test_python3.vim
+++ b/src/testdir/test_python3.vim
@@ -12,6 +12,7 @@ func Create_vim_dict()
return {'a': 1}
endfunction
+let s:system_error_pat = 'Vim(py3):SystemError: \(<built-in function eval> returned NULL without setting an error\|error return without exception set\)'
" This function should be called first. This sets up python functions used by
" the other tests.
@@ -539,11 +540,11 @@ endfunc
func Test_python3_list()
" Try to convert a null List
call AssertException(["py3 t = vim.eval('test_null_list()')"],
- \ 'Vim(py3):SystemError: <built-in function eval> returned NULL without setting an error')
+ \ s:system_error_pat)
" Try to convert a List with a null List item
call AssertException(["py3 t = vim.eval('[test_null_list()]')"],
- \ 'Vim(py3):SystemError: <built-in function eval> returned NULL without setting an error')
+ \ s:system_error_pat)
" Try to bind a null List variable (works because an empty list is used)
let cmds =<< trim END
@@ -582,11 +583,11 @@ endfunc
func Test_python3_dict()
" Try to convert a null Dict
call AssertException(["py3 t = vim.eval('test_null_dict()')"],
- \ 'Vim(py3):SystemError: <built-in function eval> returned NULL without setting an error')
+ \ s:system_error_pat)
" Try to convert a Dict with a null List value
call AssertException(["py3 t = vim.eval(\"{'a' : test_null_list()}\")"],
- \ 'Vim(py3):SystemError: <built-in function eval> returned NULL without setting an error')
+ \ s:system_error_pat)
" Try to convert a Dict with a null string key
py3 t = vim.eval("{test_null_string() : 10}")
@@ -1119,7 +1120,7 @@ func Test_python3_list_slice()
let l = [test_null_list()]
py3 ll = vim.bindeval('l')
call AssertException(["py3 x = ll[:]"],
- \ "Vim(py3):SystemError: error return without exception set")
+ \ s:system_error_pat)
endfunc
" Vars
diff --git a/src/version.c b/src/version.c
index a99765c25..8aaa0b256 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2187,
+/**/
2186,
/**/
2185,