commit cba2f65ee4dafe3801fa94b771f332fee74422c8
parent 7ae8860674e2bd8f9f82defc9ef8ec17c7f35c93
Author: Jan Edmund Lazo <jan.lazo@mail.utoronto.ca>
Date: Wed, 6 Aug 2025 01:06:56 -0400
vim-patch:8.2.3602: Python3 test fails with Python 3.10 on MS-Windows
Problem: Python3 test fails with Python 3.10 on MS-Windows.
Solution: Adjust the expected error. (Ken Takata, closes vim/vim#9118)
https://github.com/vim/vim/commit/1be7e215830d6ec9aa6200aac4ef34ac0ae85af5
Co-authored-by: K.Takata <kentkt@csc.jp>
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/test/old/testdir/test_python3.vim b/test/old/testdir/test_python3.vim
@@ -14,6 +14,7 @@ func Test_AAA_python3_setup()
py33_type_error_pattern = re.compile('^__call__\(\) takes (\d+) positional argument but (\d+) were given$')
py37_exception_repr = re.compile(r'([^\(\),])(\)+)$')
py39_type_error_pattern = re.compile('\w+\.([^(]+\(\) takes)')
+ py310_type_error_pattern = re.compile('takes (\d+) positional argument but (\d+) were given')
def emsg(ei):
return ei[0].__name__ + ':' + repr(ei[1].args)
@@ -49,6 +50,7 @@ func Test_AAA_python3_setup()
msg = msg.replace(newmsg2, oldmsg2)
# Python 3.9 reports errors like "vim.command() takes ..." instead of "command() takes ..."
msg = py39_type_error_pattern.sub(r'\1', msg)
+ msg = py310_type_error_pattern.sub(r'takes exactly \1 positional argument (\2 given)', msg)
elif sys.version_info >= (3, 5) and e.__class__ is ValueError and str(e) == 'embedded null byte':
msg = repr((TypeError, TypeError('expected bytes with no null')))
else:
@@ -2326,6 +2328,7 @@ func Test_python3_errors()
py3 cb = vim.current.buffer
py3 << trim EOF
+ import os
d = vim.Dictionary()
ned = vim.Dictionary(foo='bar', baz='abcD')
dl = vim.Dictionary(a=1)