Skip to content
Snippets Groups Projects
Commit 27610ed7 authored by Bram Moolenaar's avatar Bram Moolenaar
Browse files

updated for version 7.3.1173

Problem:    Python 2 tests don't have the same output everywhere.
Solution:   Make the Python 2 tests more portable. (ZyX)
parent 9f3685a5
No related merge requests found
......@@ -45,9 +45,10 @@ d.update({'0': -1})
dk = d.keys()
dv = d.values()
di = d.items()
dk.sort(key=repr)
dv.sort(key=repr)
di.sort(key=repr)
cmpfun = lambda a, b: cmp(repr(a), repr(b))
dk.sort(cmpfun)
dv.sort(cmpfun)
di.sort(cmpfun)
EOF
:$put =pyeval('d[''f''](self={})')
:$put =pyeval('repr(dk)')
......@@ -813,7 +814,17 @@ def ee(expr, g=globals(), l=locals()):
try:
exec(expr, g, l)
except:
cb.append(expr + ':' + repr(sys.exc_info()[:2]))
ei = sys.exc_info()
msg = sys.exc_info()[0].__name__ + ':' + repr(sys.exc_info()[1].args)
msg = msg.replace('TypeError:(\'argument 1 ', 'TypeError:(\'')
if expr.find('None') > -1:
msg = msg.replace('TypeError:(\'iteration over non-sequence\',)',
'TypeError:("\'NoneType\' object is not iterable",)')
if expr == 'fd(self=[])':
# HACK: PyMapping_Check changed meaning
msg = msg.replace('AttributeError:(\'keys\',)',
'TypeError:(\'unable to convert object to vim dictionary\',)')
cb.append(expr + ':' + msg)
else:
cb.append(expr + ':NOT FAILED')
d = vim.Dictionary()
......
This diff is collapsed.
......@@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1173,
/**/
1172,
/**/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment