forked from aniani/vim
patch 7.4.1456
Problem: Test 87 fails with Python 3.5. Solution: Work around difference. (Taro Muraoka)
This commit is contained in:
@@ -228,6 +228,8 @@ def ee(expr, g=globals(), l=locals()):
|
||||
cb.append(expr + ':' + repr((e.__class__, TypeError(msg))))
|
||||
else:
|
||||
cb.append(expr + ':' + repr((e.__class__, e)))
|
||||
elif sys.version_info >= (3, 5) and e.__class__ is ValueError and str(e) == 'embedded null byte':
|
||||
msg = cb.append(expr + ':' + repr((TypeError, TypeError('expected bytes with no null'))))
|
||||
else:
|
||||
cb.append(expr + ':' + repr((e.__class__, e)))
|
||||
else:
|
||||
@@ -264,12 +266,16 @@ EOF
|
||||
:let messages=[]
|
||||
:delfunction DictNew
|
||||
py3 <<EOF
|
||||
import sys
|
||||
d=vim.bindeval('{}')
|
||||
m=vim.bindeval('messages')
|
||||
def em(expr, g=globals(), l=locals()):
|
||||
try:
|
||||
exec(expr, g, l)
|
||||
except Exception as e:
|
||||
if sys.version_info >= (3, 5) and e.__class__ is ValueError and str(e) == 'embedded null byte':
|
||||
m.extend([TypeError.__name__])
|
||||
else:
|
||||
m.extend([e.__class__.__name__])
|
||||
|
||||
em('d["abc1"]')
|
||||
|
@@ -743,6 +743,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1456,
|
||||
/**/
|
||||
1455,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user