home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.3 / 7.3.1066 < prev    next >
Encoding:
Internet Message Format  |  2013-05-29  |  114.8 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.1066
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.3.1066
  11. Problem:    Python: Insufficient exception and error testing.
  12. Solution:   Python patch 25. (ZyX)
  13. Files:        src/testdir/test86.in, src/testdir/test86.ok,
  14.         src/testdir/test87.in, src/testdir/test87.ok
  15.  
  16.  
  17. *** ../vim-7.3.1065/src/testdir/test86.in    2013-05-30 13:14:06.000000000 +0200
  18. --- src/testdir/test86.in    2013-05-30 13:25:22.000000000 +0200
  19. ***************
  20. *** 7,12 ****
  21. --- 7,13 ----
  22.   
  23.   STARTTEST
  24.   :so small.vim
  25. + :set encoding=latin1
  26.   :if !has('python') | e! test.ok | wq! test.out | endif
  27.   :lang C
  28.   :py import vim
  29. ***************
  30. *** 785,800 ****
  31.   :$put =string(pyeval('dl2'))
  32.   :$put =string(pyeval('df(2)'))
  33.   :"
  34. ! :" Test exceptions
  35. ! :fun Exe(e)
  36. ! :   execute a:e
  37.   :endfun
  38.   py << EOF
  39.   def ee(expr, g=globals(), l=locals()):
  40.       try:
  41.           exec(expr, g, l)
  42.       except:
  43. !         cb.append(repr(sys.exc_info()[:2]))
  44.   Exe = vim.bindeval('function("Exe")')
  45.   ee('vim.command("throw \'abc\'")')
  46.   ee('Exe("throw \'def\'")')
  47. --- 786,1062 ----
  48.   :$put =string(pyeval('dl2'))
  49.   :$put =string(pyeval('df(2)'))
  50.   :"
  51. ! :" Test errors
  52. ! :fun F() dict
  53. ! :endfun
  54. ! :fun D()
  55.   :endfun
  56.   py << EOF
  57.   def ee(expr, g=globals(), l=locals()):
  58.       try:
  59.           exec(expr, g, l)
  60.       except:
  61. !         cb.append(expr + ':' + repr(sys.exc_info()[:2]))
  62. !     else:
  63. !         cb.append(expr + ':NOT FAILED')
  64. ! d = vim.Dictionary()
  65. ! ned = vim.Dictionary(foo='bar', baz='abc')
  66. ! dl = vim.Dictionary(a=1)
  67. ! dl.locked = True
  68. ! l = vim.List()
  69. ! ll = vim.List('abc')
  70. ! ll.locked = True
  71. ! f = vim.Function('string')
  72. ! fd = vim.Function('F')
  73. ! fdel = vim.Function('D')
  74. ! vim.command('delfunction D')
  75. ! def subexpr_test(expr, name, subexprs):
  76. !     cb.append('>>> Testing %s using %s' % (name, expr))
  77. !     for subexpr in subexprs:
  78. !         ee(expr % subexpr)
  79. !     cb.append('<<< Finished')
  80. ! def stringtochars_test(expr):
  81. !     return subexpr_test(expr, 'StringToChars', (
  82. !         '1',       # Fail type checks
  83. !         'u"\\0"',  # Fail PyString_AsStringAndSize(bytes, , NULL) check
  84. !         '"\\0"',   # Fail PyString_AsStringAndSize(object, , NULL) check
  85. !     ))
  86. ! class Mapping(object):
  87. !     def __init__(self, d):
  88. !         self.d = d
  89. !     def __getitem__(self, key):
  90. !         return self.d[key]
  91. !     def keys(self):
  92. !         return self.d.keys()
  93. !     def items(self):
  94. !         return self.d.items()
  95. ! def convertfrompyobject_test(expr, recurse=True):
  96. !     # pydict_to_tv
  97. !     stringtochars_test(expr % '{%s : 1}')
  98. !     if recurse:
  99. !         convertfrompyobject_test(expr % '{"abc" : %s}', False)
  100. !     # pymap_to_tv
  101. !     stringtochars_test(expr % 'Mapping({%s : 1})')
  102. !     if recurse:
  103. !         convertfrompyobject_test(expr % 'Mapping({"abc" : %s})', False)
  104. !     # pyseq_to_tv
  105. !     iter_test(expr)
  106. !     return subexpr_test(expr, 'ConvertFromPyObject', (
  107. !         'None',                 # Not conversible
  108. !         '{"": 1}',              # Empty key not allowed
  109. !         'FailingMapping()',     #
  110. !         'FailingMappingKey()',  #
  111. !     ))
  112. ! def convertfrompymapping_test(expr):
  113. !     convertfrompyobject_test(expr)
  114. !     return subexpr_test(expr, 'ConvertFromPyMapping', (
  115. !         '[]',
  116. !     ))
  117. ! def iter_test(expr):
  118. !     return subexpr_test(expr, '*Iter*', (
  119. !         'FailingIter()',
  120. !         'FailingIterNext()',
  121. !     ))
  122. ! class FailingTrue(object):
  123. !     def __nonzero__(self):
  124. !         raise NotImplementedError
  125. ! class FailingIter(object):
  126. !     def __iter__(self):
  127. !         raise NotImplementedError
  128. ! class FailingIterNext(object):
  129. !     def __iter__(self):
  130. !         return self
  131. !     def next(self):
  132. !         raise NotImplementedError
  133. ! class FailingMappingKey(object):
  134. !     def __getitem__(self, item):
  135. !         raise NotImplementedError
  136. !     def keys(self):
  137. !         return list("abc")
  138. ! class FailingMapping(object):
  139. !     def __getitem__(self):
  140. !         raise NotImplementedError
  141. !     def keys(self):
  142. !         raise NotImplementedError
  143. ! class FailingList(list):
  144. !     def __getitem__(self, idx):
  145. !         if i == 2:
  146. !             raise NotImplementedError
  147. !         else:
  148. !             return super(FailingList, self).__getitem__(idx)
  149. ! cb.append("> Output")
  150. ! cb.append(">> OutputSetattr")
  151. ! ee('del sys.stdout.softspace')
  152. ! ee('sys.stdout.softspace = []')
  153. ! ee('sys.stdout.attr = None')
  154. ! cb.append(">> OutputWrite")
  155. ! ee('sys.stdout.write(None)')
  156. ! cb.append(">> OutputWriteLines")
  157. ! ee('sys.stdout.writelines(None)')
  158. ! ee('sys.stdout.writelines([1])')
  159. ! iter_test('sys.stdout.writelines(%s)')
  160. ! cb.append("> VimCommand")
  161. ! ee('vim.command(1)')
  162. ! #! Not checked: vim->python exceptions translating: checked later
  163. ! cb.append("> VimToPython")
  164. ! #! Not checked: everything: needs errors in internal python functions
  165. ! cb.append("> VimEval")
  166. ! ee('vim.eval(1)')
  167. ! #! Not checked: everything: needs errors in internal python functions
  168. ! cb.append("> VimEvalPy")
  169. ! ee('vim.bindeval(1)')
  170. ! #! Not checked: vim->python exceptions translating: checked later
  171. ! cb.append("> VimStrwidth")
  172. ! ee('vim.strwidth(1)')
  173. ! cb.append("> Dictionary")
  174. ! cb.append(">> DictionaryConstructor")
  175. ! ee('vim.Dictionary("abc")')
  176. ! ##! Not checked: py_dict_alloc failure
  177. ! cb.append(">> DictionarySetattr")
  178. ! ee('del d.locked')
  179. ! ee('d.locked = FailingTrue()')
  180. ! ee('vim.vvars.locked = False')
  181. ! ee('d.scope = True')
  182. ! ee('d.xxx = True')
  183. ! cb.append(">> _DictionaryItem")
  184. ! ee('d.get("a", 2, 3)')
  185. ! stringtochars_test('d.get(%s)')
  186. ! ee('d.pop("a")')
  187. ! ee('dl.pop("a")')
  188. ! cb.append(">> DictionaryIterNext")
  189. ! ee('for i in ned: ned["a"] = 1')
  190. ! cb.append(">> DictionaryAssItem")
  191. ! ee('dl["b"] = 1')
  192. ! stringtochars_test('d[%s] = 1')
  193. ! convertfrompyobject_test('d["a"] = %s')
  194. ! cb.append(">> DictionaryUpdate")
  195. ! cb.append(">>> kwargs")
  196. ! cb.append(">>> iter")
  197. ! ee('d.update(FailingMapping())')
  198. ! ee('d.update([FailingIterNext()])')
  199. ! iter_test('d.update(%s)')
  200. ! convertfrompyobject_test('d.update(%s)')
  201. ! stringtochars_test('d.update(((%s, 0),))')
  202. ! convertfrompyobject_test('d.update((("a", %s),))')
  203. ! cb.append(">> DictionaryPopItem")
  204. ! ee('d.popitem(1, 2)')
  205. ! cb.append(">> DictionaryHasKey")
  206. ! ee('d.has_key()')
  207. ! cb.append("> List")
  208. ! cb.append(">> ListConstructor")
  209. ! ee('vim.List(1, 2)')
  210. ! ee('vim.List(a=1)')
  211. ! iter_test('vim.List(%s)')
  212. ! convertfrompyobject_test('vim.List([%s])')
  213. ! cb.append(">> ListItem")
  214. ! ee('l[1000]')
  215. ! cb.append(">> ListAssItem")
  216. ! ee('ll[1] = 2')
  217. ! ee('l[1000] = 3')
  218. ! cb.append(">> ListAssSlice")
  219. ! ee('ll[1:100] = "abc"')
  220. ! iter_test('l[:] = %s')
  221. ! convertfrompyobject_test('l[:] = [%s]')
  222. ! cb.append(">> ListConcatInPlace")
  223. ! iter_test('l.extend(%s)')
  224. ! convertfrompyobject_test('l.extend([%s])')
  225. ! cb.append(">> ListSetattr")
  226. ! ee('del l.locked')
  227. ! ee('l.locked = FailingTrue()')
  228. ! ee('l.xxx = True')
  229. ! cb.append("> Function")
  230. ! cb.append(">> FunctionConstructor")
  231. ! ee('vim.Function("123")')
  232. ! ee('vim.Function("xxx_non_existent_function_xxx")')
  233. ! ee('vim.Function("xxx#non#existent#function#xxx")')
  234. ! cb.append(">> FunctionCall")
  235. ! convertfrompyobject_test('f(%s)')
  236. ! convertfrompymapping_test('fd(self=%s)')
  237. ! cb.append("> TabPage")
  238. ! cb.append(">> TabPageAttr")
  239. ! ee('vim.current.tabpage.xxx')
  240. ! cb.append("> TabList")
  241. ! cb.append(">> TabListItem")
  242. ! ee('vim.tabpages[1000]')
  243. ! cb.append("> Window")
  244. ! cb.append(">> WindowAttr")
  245. ! ee('vim.current.window.xxx')
  246. ! cb.append(">> WindowSetattr")
  247. ! ee('vim.current.window.buffer = 0')
  248. ! ee('vim.current.window.cursor = (10000000000, 100000000)')
  249. ! ee('vim.current.window.cursor = True')
  250. ! ee('vim.current.window.height = "abc"')
  251. ! ee('vim.current.window.width  = "abc"')
  252. ! ee('vim.current.window.xxxxxx = True')
  253. ! cb.append("> WinList")
  254. ! cb.append(">> WinListItem")
  255. ! ee('vim.windows[1000]')
  256. ! cb.append("> Buffer")
  257. ! cb.append(">> StringToLine (indirect)")
  258. ! ee('vim.current.buffer[0] = "\\na"')
  259. ! cb.append(">> SetBufferLine (indirect)")
  260. ! ee('vim.current.buffer[0] = True')
  261. ! cb.append(">> SetBufferLines (indirect)")
  262. ! ee('vim.current.buffer[:] = True')
  263. ! ee('vim.current.buffer[:] = ["\\na", "bc"]')
  264. ! cb.append(">> InsertBufferLines (indirect)")
  265. ! ee('vim.current.buffer.append(None)')
  266. ! ee('vim.current.buffer.append(["\\na", "bc"])')
  267. ! ee('vim.current.buffer.append("\\nbc")')
  268. ! cb.append(">> RBItem")
  269. ! ee('vim.current.buffer[10000000000]')
  270. ! cb.append(">> RBAsItem")
  271. ! ee('vim.current.buffer[10000000000] = ""')
  272. ! cb.append(">> BufferAttr")
  273. ! ee('vim.current.buffer.xxx')
  274. ! cb.append(">> BufferSetattr")
  275. ! ee('vim.current.buffer.name = True')
  276. ! ee('vim.current.buffer.xxx = True')
  277. ! cb.append(">> BufferMark")
  278. ! ee('vim.current.buffer.mark(0)')
  279. ! ee('vim.current.buffer.mark("abc")')
  280. ! ee('vim.current.buffer.mark("!")')
  281. ! cb.append(">> BufferRange")
  282. ! ee('vim.current.buffer.range(1, 2, 3)')
  283. ! cb.append("> BufMap")
  284. ! cb.append(">> BufMapItem")
  285. ! ee('vim.buffers[None]')
  286. ! ee('vim.buffers[100000000]')
  287. ! cb.append("> Current")
  288. ! cb.append(">> CurrentGetattr")
  289. ! ee('vim.current.xxx')
  290. ! cb.append(">> CurrentSetattr")
  291. ! ee('vim.current.line = True')
  292. ! ee('vim.current.buffer = True')
  293. ! ee('vim.current.window = True')
  294. ! ee('vim.current.tabpage = True')
  295. ! ee('vim.current.xxx = True')
  296. ! EOF
  297. ! :"
  298. ! :" Test exceptions
  299. ! :fun Exe(e)
  300. ! :   execute a:e
  301. ! :endfun
  302. ! py << EOF
  303.   Exe = vim.bindeval('function("Exe")')
  304.   ee('vim.command("throw \'abc\'")')
  305.   ee('Exe("throw \'def\'")')
  306. *** ../vim-7.3.1065/src/testdir/test86.ok    2013-05-30 13:14:06.000000000 +0200
  307. --- src/testdir/test86.ok    2013-05-30 13:25:22.000000000 +0200
  308. ***************
  309. *** 429,437 ****
  310.   ['a', 'b', 'c']
  311.   [2, 2]
  312.   [2, 2]
  313. ! (<class 'vim.error'>, error('abc',))
  314. ! (<class 'vim.error'>, error('def',))
  315. ! (<class 'vim.error'>, error('ghi',))
  316. ! (<class 'vim.error'>, error('Vim(echoerr):jkl',))
  317. ! (<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',))
  318. ! (<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',))
  319. --- 429,1081 ----
  320.   ['a', 'b', 'c']
  321.   [2, 2]
  322.   [2, 2]
  323. ! > Output
  324. ! >> OutputSetattr
  325. ! del sys.stdout.softspace:(<type 'exceptions.AttributeError'>, AttributeError("can't delete OutputObject attributes",))
  326. ! sys.stdout.softspace = []:(<type 'exceptions.TypeError'>, TypeError('softspace must be an integer',))
  327. ! sys.stdout.attr = None:(<type 'exceptions.AttributeError'>, AttributeError('invalid attribute',))
  328. ! >> OutputWrite
  329. ! sys.stdout.write(None):(<type 'exceptions.TypeError'>, TypeError('coercing to Unicode: need string or buffer, NoneType found',))
  330. ! >> OutputWriteLines
  331. ! sys.stdout.writelines(None):(<type 'exceptions.TypeError'>, TypeError("'NoneType' object is not iterable",))
  332. ! sys.stdout.writelines([1]):(<type 'exceptions.TypeError'>, TypeError('writelines() requires list of strings',))
  333. ! >>> Testing *Iter* using sys.stdout.writelines(%s)
  334. ! sys.stdout.writelines(FailingIter()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  335. ! sys.stdout.writelines(FailingIterNext()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  336. ! <<< Finished
  337. ! > VimCommand
  338. ! vim.command(1):(<type 'exceptions.TypeError'>, TypeError('must be string, not int',))
  339. ! > VimToPython
  340. ! > VimEval
  341. ! vim.eval(1):(<type 'exceptions.TypeError'>, TypeError('must be string, not int',))
  342. ! > VimEvalPy
  343. ! vim.bindeval(1):(<type 'exceptions.TypeError'>, TypeError('must be string, not int',))
  344. ! > VimStrwidth
  345. ! vim.strwidth(1):(<type 'exceptions.TypeError'>, TypeError('must be string, not int',))
  346. ! > Dictionary
  347. ! >> DictionaryConstructor
  348. ! vim.Dictionary("abc"):(<type 'exceptions.ValueError'>, ValueError('expected sequence element of size 2',))
  349. ! >> DictionarySetattr
  350. ! del d.locked:(<type 'exceptions.AttributeError'>, AttributeError('cannot delete vim.Dictionary attributes',))
  351. ! d.locked = FailingTrue():(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  352. ! vim.vvars.locked = False:(<type 'exceptions.TypeError'>, TypeError('cannot modify fixed dictionary',))
  353. ! d.scope = True:(<type 'exceptions.AttributeError'>, AttributeError('cannot set this attribute',))
  354. ! d.xxx = True:(<type 'exceptions.AttributeError'>, AttributeError('cannot set this attribute',))
  355. ! >> _DictionaryItem
  356. ! d.get("a", 2, 3):(<type 'exceptions.TypeError'>, TypeError('function takes at most 2 arguments (3 given)',))
  357. ! >>> Testing StringToChars using d.get(%s)
  358. ! d.get(1):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  359. ! d.get(u"\0"):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  360. ! d.get("\0"):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  361. ! <<< Finished
  362. ! d.pop("a"):(<type 'exceptions.KeyError'>, KeyError('a',))
  363. ! dl.pop("a"):(<class 'vim.error'>, error('dict is locked',))
  364. ! >> DictionaryIterNext
  365. ! for i in ned: ned["a"] = 1:(<type 'exceptions.RuntimeError'>, RuntimeError('hashtab changed during iteration',))
  366. ! >> DictionaryAssItem
  367. ! dl["b"] = 1:(<class 'vim.error'>, error('dict is locked',))
  368. ! >>> Testing StringToChars using d[%s] = 1
  369. ! d[1] = 1:(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  370. ! d[u"\0"] = 1:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  371. ! d["\0"] = 1:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  372. ! <<< Finished
  373. ! >>> Testing StringToChars using d["a"] = {%s : 1}
  374. ! d["a"] = {1 : 1}:(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  375. ! d["a"] = {u"\0" : 1}:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  376. ! d["a"] = {"\0" : 1}:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  377. ! <<< Finished
  378. ! >>> Testing StringToChars using d["a"] = {"abc" : {%s : 1}}
  379. ! d["a"] = {"abc" : {1 : 1}}:(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  380. ! d["a"] = {"abc" : {u"\0" : 1}}:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  381. ! d["a"] = {"abc" : {"\0" : 1}}:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  382. ! <<< Finished
  383. ! >>> Testing StringToChars using d["a"] = {"abc" : Mapping({%s : 1})}
  384. ! d["a"] = {"abc" : Mapping({1 : 1})}:(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  385. ! d["a"] = {"abc" : Mapping({u"\0" : 1})}:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  386. ! d["a"] = {"abc" : Mapping({"\0" : 1})}:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  387. ! <<< Finished
  388. ! >>> Testing *Iter* using d["a"] = {"abc" : %s}
  389. ! d["a"] = {"abc" : FailingIter()}:(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  390. ! d["a"] = {"abc" : FailingIterNext()}:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  391. ! <<< Finished
  392. ! >>> Testing ConvertFromPyObject using d["a"] = {"abc" : %s}
  393. ! d["a"] = {"abc" : None}:(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  394. ! d["a"] = {"abc" : {"": 1}}:(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  395. ! d["a"] = {"abc" : FailingMapping()}:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  396. ! d["a"] = {"abc" : FailingMappingKey()}:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  397. ! <<< Finished
  398. ! >>> Testing StringToChars using d["a"] = Mapping({%s : 1})
  399. ! d["a"] = Mapping({1 : 1}):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  400. ! d["a"] = Mapping({u"\0" : 1}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  401. ! d["a"] = Mapping({"\0" : 1}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  402. ! <<< Finished
  403. ! >>> Testing StringToChars using d["a"] = Mapping({"abc" : {%s : 1}})
  404. ! d["a"] = Mapping({"abc" : {1 : 1}}):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  405. ! d["a"] = Mapping({"abc" : {u"\0" : 1}}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  406. ! d["a"] = Mapping({"abc" : {"\0" : 1}}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  407. ! <<< Finished
  408. ! >>> Testing StringToChars using d["a"] = Mapping({"abc" : Mapping({%s : 1})})
  409. ! d["a"] = Mapping({"abc" : Mapping({1 : 1})}):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  410. ! d["a"] = Mapping({"abc" : Mapping({u"\0" : 1})}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  411. ! d["a"] = Mapping({"abc" : Mapping({"\0" : 1})}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  412. ! <<< Finished
  413. ! >>> Testing *Iter* using d["a"] = Mapping({"abc" : %s})
  414. ! d["a"] = Mapping({"abc" : FailingIter()}):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  415. ! d["a"] = Mapping({"abc" : FailingIterNext()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  416. ! <<< Finished
  417. ! >>> Testing ConvertFromPyObject using d["a"] = Mapping({"abc" : %s})
  418. ! d["a"] = Mapping({"abc" : None}):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  419. ! d["a"] = Mapping({"abc" : {"": 1}}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  420. ! d["a"] = Mapping({"abc" : FailingMapping()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  421. ! d["a"] = Mapping({"abc" : FailingMappingKey()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  422. ! <<< Finished
  423. ! >>> Testing *Iter* using d["a"] = %s
  424. ! d["a"] = FailingIter():(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  425. ! d["a"] = FailingIterNext():(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  426. ! <<< Finished
  427. ! >>> Testing ConvertFromPyObject using d["a"] = %s
  428. ! d["a"] = None:(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  429. ! d["a"] = {"": 1}:(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  430. ! d["a"] = FailingMapping():(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  431. ! d["a"] = FailingMappingKey():(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  432. ! <<< Finished
  433. ! >> DictionaryUpdate
  434. ! >>> kwargs
  435. ! >>> iter
  436. ! d.update(FailingMapping()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  437. ! d.update([FailingIterNext()]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  438. ! >>> Testing *Iter* using d.update(%s)
  439. ! d.update(FailingIter()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  440. ! d.update(FailingIterNext()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  441. ! <<< Finished
  442. ! >>> Testing StringToChars using d.update({%s : 1})
  443. ! d.update({1 : 1}):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  444. ! d.update({u"\0" : 1}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  445. ! d.update({"\0" : 1}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  446. ! <<< Finished
  447. ! >>> Testing StringToChars using d.update({"abc" : {%s : 1}})
  448. ! d.update({"abc" : {1 : 1}}):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  449. ! d.update({"abc" : {u"\0" : 1}}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  450. ! d.update({"abc" : {"\0" : 1}}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  451. ! <<< Finished
  452. ! >>> Testing StringToChars using d.update({"abc" : Mapping({%s : 1})})
  453. ! d.update({"abc" : Mapping({1 : 1})}):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  454. ! d.update({"abc" : Mapping({u"\0" : 1})}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  455. ! d.update({"abc" : Mapping({"\0" : 1})}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  456. ! <<< Finished
  457. ! >>> Testing *Iter* using d.update({"abc" : %s})
  458. ! d.update({"abc" : FailingIter()}):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  459. ! d.update({"abc" : FailingIterNext()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  460. ! <<< Finished
  461. ! >>> Testing ConvertFromPyObject using d.update({"abc" : %s})
  462. ! d.update({"abc" : None}):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  463. ! d.update({"abc" : {"": 1}}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  464. ! d.update({"abc" : FailingMapping()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  465. ! d.update({"abc" : FailingMappingKey()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  466. ! <<< Finished
  467. ! >>> Testing StringToChars using d.update(Mapping({%s : 1}))
  468. ! d.update(Mapping({1 : 1})):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  469. ! d.update(Mapping({u"\0" : 1})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  470. ! d.update(Mapping({"\0" : 1})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  471. ! <<< Finished
  472. ! >>> Testing StringToChars using d.update(Mapping({"abc" : {%s : 1}}))
  473. ! d.update(Mapping({"abc" : {1 : 1}})):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  474. ! d.update(Mapping({"abc" : {u"\0" : 1}})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  475. ! d.update(Mapping({"abc" : {"\0" : 1}})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  476. ! <<< Finished
  477. ! >>> Testing StringToChars using d.update(Mapping({"abc" : Mapping({%s : 1})}))
  478. ! d.update(Mapping({"abc" : Mapping({1 : 1})})):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  479. ! d.update(Mapping({"abc" : Mapping({u"\0" : 1})})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  480. ! d.update(Mapping({"abc" : Mapping({"\0" : 1})})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  481. ! <<< Finished
  482. ! >>> Testing *Iter* using d.update(Mapping({"abc" : %s}))
  483. ! d.update(Mapping({"abc" : FailingIter()})):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  484. ! d.update(Mapping({"abc" : FailingIterNext()})):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  485. ! <<< Finished
  486. ! >>> Testing ConvertFromPyObject using d.update(Mapping({"abc" : %s}))
  487. ! d.update(Mapping({"abc" : None})):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  488. ! d.update(Mapping({"abc" : {"": 1}})):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  489. ! d.update(Mapping({"abc" : FailingMapping()})):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  490. ! d.update(Mapping({"abc" : FailingMappingKey()})):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  491. ! <<< Finished
  492. ! >>> Testing *Iter* using d.update(%s)
  493. ! d.update(FailingIter()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  494. ! d.update(FailingIterNext()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  495. ! <<< Finished
  496. ! >>> Testing ConvertFromPyObject using d.update(%s)
  497. ! d.update(None):(<type 'exceptions.TypeError'>, TypeError("'NoneType' object is not iterable",))
  498. ! d.update({"": 1}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  499. ! d.update(FailingMapping()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  500. ! d.update(FailingMappingKey()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  501. ! <<< Finished
  502. ! >>> Testing StringToChars using d.update(((%s, 0),))
  503. ! d.update(((1, 0),)):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  504. ! d.update(((u"\0", 0),)):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  505. ! d.update((("\0", 0),)):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  506. ! <<< Finished
  507. ! >>> Testing StringToChars using d.update((("a", {%s : 1}),))
  508. ! d.update((("a", {1 : 1}),)):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  509. ! d.update((("a", {u"\0" : 1}),)):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  510. ! d.update((("a", {"\0" : 1}),)):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  511. ! <<< Finished
  512. ! >>> Testing StringToChars using d.update((("a", {"abc" : {%s : 1}}),))
  513. ! d.update((("a", {"abc" : {1 : 1}}),)):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  514. ! d.update((("a", {"abc" : {u"\0" : 1}}),)):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  515. ! d.update((("a", {"abc" : {"\0" : 1}}),)):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  516. ! <<< Finished
  517. ! >>> Testing StringToChars using d.update((("a", {"abc" : Mapping({%s : 1})}),))
  518. ! d.update((("a", {"abc" : Mapping({1 : 1})}),)):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  519. ! d.update((("a", {"abc" : Mapping({u"\0" : 1})}),)):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  520. ! d.update((("a", {"abc" : Mapping({"\0" : 1})}),)):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  521. ! <<< Finished
  522. ! >>> Testing *Iter* using d.update((("a", {"abc" : %s}),))
  523. ! d.update((("a", {"abc" : FailingIter()}),)):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  524. ! d.update((("a", {"abc" : FailingIterNext()}),)):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  525. ! <<< Finished
  526. ! >>> Testing ConvertFromPyObject using d.update((("a", {"abc" : %s}),))
  527. ! d.update((("a", {"abc" : None}),)):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  528. ! d.update((("a", {"abc" : {"": 1}}),)):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  529. ! d.update((("a", {"abc" : FailingMapping()}),)):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  530. ! d.update((("a", {"abc" : FailingMappingKey()}),)):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  531. ! <<< Finished
  532. ! >>> Testing StringToChars using d.update((("a", Mapping({%s : 1})),))
  533. ! d.update((("a", Mapping({1 : 1})),)):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  534. ! d.update((("a", Mapping({u"\0" : 1})),)):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  535. ! d.update((("a", Mapping({"\0" : 1})),)):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  536. ! <<< Finished
  537. ! >>> Testing StringToChars using d.update((("a", Mapping({"abc" : {%s : 1}})),))
  538. ! d.update((("a", Mapping({"abc" : {1 : 1}})),)):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  539. ! d.update((("a", Mapping({"abc" : {u"\0" : 1}})),)):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  540. ! d.update((("a", Mapping({"abc" : {"\0" : 1}})),)):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  541. ! <<< Finished
  542. ! >>> Testing StringToChars using d.update((("a", Mapping({"abc" : Mapping({%s : 1})})),))
  543. ! d.update((("a", Mapping({"abc" : Mapping({1 : 1})})),)):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  544. ! d.update((("a", Mapping({"abc" : Mapping({u"\0" : 1})})),)):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  545. ! d.update((("a", Mapping({"abc" : Mapping({"\0" : 1})})),)):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  546. ! <<< Finished
  547. ! >>> Testing *Iter* using d.update((("a", Mapping({"abc" : %s})),))
  548. ! d.update((("a", Mapping({"abc" : FailingIter()})),)):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  549. ! d.update((("a", Mapping({"abc" : FailingIterNext()})),)):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  550. ! <<< Finished
  551. ! >>> Testing ConvertFromPyObject using d.update((("a", Mapping({"abc" : %s})),))
  552. ! d.update((("a", Mapping({"abc" : None})),)):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  553. ! d.update((("a", Mapping({"abc" : {"": 1}})),)):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  554. ! d.update((("a", Mapping({"abc" : FailingMapping()})),)):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  555. ! d.update((("a", Mapping({"abc" : FailingMappingKey()})),)):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  556. ! <<< Finished
  557. ! >>> Testing *Iter* using d.update((("a", %s),))
  558. ! d.update((("a", FailingIter()),)):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  559. ! d.update((("a", FailingIterNext()),)):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  560. ! <<< Finished
  561. ! >>> Testing ConvertFromPyObject using d.update((("a", %s),))
  562. ! d.update((("a", None),)):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  563. ! d.update((("a", {"": 1}),)):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  564. ! d.update((("a", FailingMapping()),)):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  565. ! d.update((("a", FailingMappingKey()),)):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  566. ! <<< Finished
  567. ! >> DictionaryPopItem
  568. ! d.popitem(1, 2):(<type 'exceptions.TypeError'>, TypeError('function takes exactly 1 argument (2 given)',))
  569. ! >> DictionaryHasKey
  570. ! d.has_key():(<type 'exceptions.TypeError'>, TypeError('function takes exactly 1 argument (0 given)',))
  571. ! > List
  572. ! >> ListConstructor
  573. ! vim.List(1, 2):(<type 'exceptions.TypeError'>, TypeError('function takes at most 1 argument (2 given)',))
  574. ! vim.List(a=1):(<type 'exceptions.TypeError'>, TypeError('list constructor does not accept keyword arguments',))
  575. ! >>> Testing *Iter* using vim.List(%s)
  576. ! vim.List(FailingIter()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  577. ! vim.List(FailingIterNext()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  578. ! <<< Finished
  579. ! >>> Testing StringToChars using vim.List([{%s : 1}])
  580. ! vim.List([{1 : 1}]):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  581. ! vim.List([{u"\0" : 1}]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  582. ! vim.List([{"\0" : 1}]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  583. ! <<< Finished
  584. ! >>> Testing StringToChars using vim.List([{"abc" : {%s : 1}}])
  585. ! vim.List([{"abc" : {1 : 1}}]):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  586. ! vim.List([{"abc" : {u"\0" : 1}}]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  587. ! vim.List([{"abc" : {"\0" : 1}}]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  588. ! <<< Finished
  589. ! >>> Testing StringToChars using vim.List([{"abc" : Mapping({%s : 1})}])
  590. ! vim.List([{"abc" : Mapping({1 : 1})}]):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  591. ! vim.List([{"abc" : Mapping({u"\0" : 1})}]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  592. ! vim.List([{"abc" : Mapping({"\0" : 1})}]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  593. ! <<< Finished
  594. ! >>> Testing *Iter* using vim.List([{"abc" : %s}])
  595. ! vim.List([{"abc" : FailingIter()}]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  596. ! vim.List([{"abc" : FailingIterNext()}]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  597. ! <<< Finished
  598. ! >>> Testing ConvertFromPyObject using vim.List([{"abc" : %s}])
  599. ! vim.List([{"abc" : None}]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  600. ! vim.List([{"abc" : {"": 1}}]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  601. ! vim.List([{"abc" : FailingMapping()}]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  602. ! vim.List([{"abc" : FailingMappingKey()}]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  603. ! <<< Finished
  604. ! >>> Testing StringToChars using vim.List([Mapping({%s : 1})])
  605. ! vim.List([Mapping({1 : 1})]):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  606. ! vim.List([Mapping({u"\0" : 1})]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  607. ! vim.List([Mapping({"\0" : 1})]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  608. ! <<< Finished
  609. ! >>> Testing StringToChars using vim.List([Mapping({"abc" : {%s : 1}})])
  610. ! vim.List([Mapping({"abc" : {1 : 1}})]):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  611. ! vim.List([Mapping({"abc" : {u"\0" : 1}})]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  612. ! vim.List([Mapping({"abc" : {"\0" : 1}})]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  613. ! <<< Finished
  614. ! >>> Testing StringToChars using vim.List([Mapping({"abc" : Mapping({%s : 1})})])
  615. ! vim.List([Mapping({"abc" : Mapping({1 : 1})})]):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  616. ! vim.List([Mapping({"abc" : Mapping({u"\0" : 1})})]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  617. ! vim.List([Mapping({"abc" : Mapping({"\0" : 1})})]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  618. ! <<< Finished
  619. ! >>> Testing *Iter* using vim.List([Mapping({"abc" : %s})])
  620. ! vim.List([Mapping({"abc" : FailingIter()})]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  621. ! vim.List([Mapping({"abc" : FailingIterNext()})]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  622. ! <<< Finished
  623. ! >>> Testing ConvertFromPyObject using vim.List([Mapping({"abc" : %s})])
  624. ! vim.List([Mapping({"abc" : None})]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  625. ! vim.List([Mapping({"abc" : {"": 1}})]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  626. ! vim.List([Mapping({"abc" : FailingMapping()})]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  627. ! vim.List([Mapping({"abc" : FailingMappingKey()})]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  628. ! <<< Finished
  629. ! >>> Testing *Iter* using vim.List([%s])
  630. ! vim.List([FailingIter()]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  631. ! vim.List([FailingIterNext()]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  632. ! <<< Finished
  633. ! >>> Testing ConvertFromPyObject using vim.List([%s])
  634. ! vim.List([None]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  635. ! vim.List([{"": 1}]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  636. ! vim.List([FailingMapping()]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  637. ! vim.List([FailingMappingKey()]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  638. ! <<< Finished
  639. ! >> ListItem
  640. ! l[1000]:(<type 'exceptions.IndexError'>, IndexError('list index out of range',))
  641. ! >> ListAssItem
  642. ! ll[1] = 2:(<class 'vim.error'>, error('list is locked',))
  643. ! l[1000] = 3:(<type 'exceptions.IndexError'>, IndexError('list index out of range',))
  644. ! >> ListAssSlice
  645. ! ll[1:100] = "abc":(<class 'vim.error'>, error('list is locked',))
  646. ! >>> Testing *Iter* using l[:] = %s
  647. ! l[:] = FailingIter():(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  648. ! l[:] = FailingIterNext():(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  649. ! <<< Finished
  650. ! >>> Testing StringToChars using l[:] = [{%s : 1}]
  651. ! l[:] = [{1 : 1}]:(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  652. ! l[:] = [{u"\0" : 1}]:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  653. ! l[:] = [{"\0" : 1}]:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  654. ! <<< Finished
  655. ! >>> Testing StringToChars using l[:] = [{"abc" : {%s : 1}}]
  656. ! l[:] = [{"abc" : {1 : 1}}]:(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  657. ! l[:] = [{"abc" : {u"\0" : 1}}]:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  658. ! l[:] = [{"abc" : {"\0" : 1}}]:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  659. ! <<< Finished
  660. ! >>> Testing StringToChars using l[:] = [{"abc" : Mapping({%s : 1})}]
  661. ! l[:] = [{"abc" : Mapping({1 : 1})}]:(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  662. ! l[:] = [{"abc" : Mapping({u"\0" : 1})}]:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  663. ! l[:] = [{"abc" : Mapping({"\0" : 1})}]:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  664. ! <<< Finished
  665. ! >>> Testing *Iter* using l[:] = [{"abc" : %s}]
  666. ! l[:] = [{"abc" : FailingIter()}]:(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  667. ! l[:] = [{"abc" : FailingIterNext()}]:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  668. ! <<< Finished
  669. ! >>> Testing ConvertFromPyObject using l[:] = [{"abc" : %s}]
  670. ! l[:] = [{"abc" : None}]:(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  671. ! l[:] = [{"abc" : {"": 1}}]:(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  672. ! l[:] = [{"abc" : FailingMapping()}]:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  673. ! l[:] = [{"abc" : FailingMappingKey()}]:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  674. ! <<< Finished
  675. ! >>> Testing StringToChars using l[:] = [Mapping({%s : 1})]
  676. ! l[:] = [Mapping({1 : 1})]:(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  677. ! l[:] = [Mapping({u"\0" : 1})]:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  678. ! l[:] = [Mapping({"\0" : 1})]:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  679. ! <<< Finished
  680. ! >>> Testing StringToChars using l[:] = [Mapping({"abc" : {%s : 1}})]
  681. ! l[:] = [Mapping({"abc" : {1 : 1}})]:(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  682. ! l[:] = [Mapping({"abc" : {u"\0" : 1}})]:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  683. ! l[:] = [Mapping({"abc" : {"\0" : 1}})]:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  684. ! <<< Finished
  685. ! >>> Testing StringToChars using l[:] = [Mapping({"abc" : Mapping({%s : 1})})]
  686. ! l[:] = [Mapping({"abc" : Mapping({1 : 1})})]:(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  687. ! l[:] = [Mapping({"abc" : Mapping({u"\0" : 1})})]:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  688. ! l[:] = [Mapping({"abc" : Mapping({"\0" : 1})})]:(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  689. ! <<< Finished
  690. ! >>> Testing *Iter* using l[:] = [Mapping({"abc" : %s})]
  691. ! l[:] = [Mapping({"abc" : FailingIter()})]:(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  692. ! l[:] = [Mapping({"abc" : FailingIterNext()})]:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  693. ! <<< Finished
  694. ! >>> Testing ConvertFromPyObject using l[:] = [Mapping({"abc" : %s})]
  695. ! l[:] = [Mapping({"abc" : None})]:(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  696. ! l[:] = [Mapping({"abc" : {"": 1}})]:(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  697. ! l[:] = [Mapping({"abc" : FailingMapping()})]:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  698. ! l[:] = [Mapping({"abc" : FailingMappingKey()})]:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  699. ! <<< Finished
  700. ! >>> Testing *Iter* using l[:] = [%s]
  701. ! l[:] = [FailingIter()]:(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  702. ! l[:] = [FailingIterNext()]:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  703. ! <<< Finished
  704. ! >>> Testing ConvertFromPyObject using l[:] = [%s]
  705. ! l[:] = [None]:(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  706. ! l[:] = [{"": 1}]:(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  707. ! l[:] = [FailingMapping()]:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  708. ! l[:] = [FailingMappingKey()]:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  709. ! <<< Finished
  710. ! >> ListConcatInPlace
  711. ! >>> Testing *Iter* using l.extend(%s)
  712. ! l.extend(FailingIter()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  713. ! l.extend(FailingIterNext()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  714. ! <<< Finished
  715. ! >>> Testing StringToChars using l.extend([{%s : 1}])
  716. ! l.extend([{1 : 1}]):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  717. ! l.extend([{u"\0" : 1}]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  718. ! l.extend([{"\0" : 1}]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  719. ! <<< Finished
  720. ! >>> Testing StringToChars using l.extend([{"abc" : {%s : 1}}])
  721. ! l.extend([{"abc" : {1 : 1}}]):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  722. ! l.extend([{"abc" : {u"\0" : 1}}]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  723. ! l.extend([{"abc" : {"\0" : 1}}]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  724. ! <<< Finished
  725. ! >>> Testing StringToChars using l.extend([{"abc" : Mapping({%s : 1})}])
  726. ! l.extend([{"abc" : Mapping({1 : 1})}]):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  727. ! l.extend([{"abc" : Mapping({u"\0" : 1})}]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  728. ! l.extend([{"abc" : Mapping({"\0" : 1})}]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  729. ! <<< Finished
  730. ! >>> Testing *Iter* using l.extend([{"abc" : %s}])
  731. ! l.extend([{"abc" : FailingIter()}]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  732. ! l.extend([{"abc" : FailingIterNext()}]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  733. ! <<< Finished
  734. ! >>> Testing ConvertFromPyObject using l.extend([{"abc" : %s}])
  735. ! l.extend([{"abc" : None}]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  736. ! l.extend([{"abc" : {"": 1}}]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  737. ! l.extend([{"abc" : FailingMapping()}]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  738. ! l.extend([{"abc" : FailingMappingKey()}]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  739. ! <<< Finished
  740. ! >>> Testing StringToChars using l.extend([Mapping({%s : 1})])
  741. ! l.extend([Mapping({1 : 1})]):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  742. ! l.extend([Mapping({u"\0" : 1})]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  743. ! l.extend([Mapping({"\0" : 1})]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  744. ! <<< Finished
  745. ! >>> Testing StringToChars using l.extend([Mapping({"abc" : {%s : 1}})])
  746. ! l.extend([Mapping({"abc" : {1 : 1}})]):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  747. ! l.extend([Mapping({"abc" : {u"\0" : 1}})]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  748. ! l.extend([Mapping({"abc" : {"\0" : 1}})]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  749. ! <<< Finished
  750. ! >>> Testing StringToChars using l.extend([Mapping({"abc" : Mapping({%s : 1})})])
  751. ! l.extend([Mapping({"abc" : Mapping({1 : 1})})]):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  752. ! l.extend([Mapping({"abc" : Mapping({u"\0" : 1})})]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  753. ! l.extend([Mapping({"abc" : Mapping({"\0" : 1})})]):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  754. ! <<< Finished
  755. ! >>> Testing *Iter* using l.extend([Mapping({"abc" : %s})])
  756. ! l.extend([Mapping({"abc" : FailingIter()})]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  757. ! l.extend([Mapping({"abc" : FailingIterNext()})]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  758. ! <<< Finished
  759. ! >>> Testing ConvertFromPyObject using l.extend([Mapping({"abc" : %s})])
  760. ! l.extend([Mapping({"abc" : None})]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  761. ! l.extend([Mapping({"abc" : {"": 1}})]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  762. ! l.extend([Mapping({"abc" : FailingMapping()})]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  763. ! l.extend([Mapping({"abc" : FailingMappingKey()})]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  764. ! <<< Finished
  765. ! >>> Testing *Iter* using l.extend([%s])
  766. ! l.extend([FailingIter()]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  767. ! l.extend([FailingIterNext()]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  768. ! <<< Finished
  769. ! >>> Testing ConvertFromPyObject using l.extend([%s])
  770. ! l.extend([None]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  771. ! l.extend([{"": 1}]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  772. ! l.extend([FailingMapping()]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  773. ! l.extend([FailingMappingKey()]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  774. ! <<< Finished
  775. ! >> ListSetattr
  776. ! del l.locked:(<type 'exceptions.AttributeError'>, AttributeError('cannot delete vim.List attributes',))
  777. ! l.locked = FailingTrue():(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  778. ! l.xxx = True:(<type 'exceptions.AttributeError'>, AttributeError('cannot set this attribute',))
  779. ! > Function
  780. ! >> FunctionConstructor
  781. ! vim.Function("123"):(<type 'exceptions.ValueError'>, ValueError('unnamed function does not exist',))
  782. ! vim.Function("xxx_non_existent_function_xxx"):(<type 'exceptions.ValueError'>, ValueError('function does not exist',))
  783. ! vim.Function("xxx#non#existent#function#xxx"):(<type 'exceptions.ValueError'>, ValueError('function does not exist',))
  784. ! >> FunctionCall
  785. ! >>> Testing StringToChars using f({%s : 1})
  786. ! f({1 : 1}):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  787. ! f({u"\0" : 1}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  788. ! f({"\0" : 1}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  789. ! <<< Finished
  790. ! >>> Testing StringToChars using f({"abc" : {%s : 1}})
  791. ! f({"abc" : {1 : 1}}):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  792. ! f({"abc" : {u"\0" : 1}}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  793. ! f({"abc" : {"\0" : 1}}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  794. ! <<< Finished
  795. ! >>> Testing StringToChars using f({"abc" : Mapping({%s : 1})})
  796. ! f({"abc" : Mapping({1 : 1})}):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  797. ! f({"abc" : Mapping({u"\0" : 1})}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  798. ! f({"abc" : Mapping({"\0" : 1})}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  799. ! <<< Finished
  800. ! >>> Testing *Iter* using f({"abc" : %s})
  801. ! f({"abc" : FailingIter()}):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  802. ! f({"abc" : FailingIterNext()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  803. ! <<< Finished
  804. ! >>> Testing ConvertFromPyObject using f({"abc" : %s})
  805. ! f({"abc" : None}):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  806. ! f({"abc" : {"": 1}}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  807. ! f({"abc" : FailingMapping()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  808. ! f({"abc" : FailingMappingKey()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  809. ! <<< Finished
  810. ! >>> Testing StringToChars using f(Mapping({%s : 1}))
  811. ! f(Mapping({1 : 1})):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  812. ! f(Mapping({u"\0" : 1})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  813. ! f(Mapping({"\0" : 1})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  814. ! <<< Finished
  815. ! >>> Testing StringToChars using f(Mapping({"abc" : {%s : 1}}))
  816. ! f(Mapping({"abc" : {1 : 1}})):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  817. ! f(Mapping({"abc" : {u"\0" : 1}})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  818. ! f(Mapping({"abc" : {"\0" : 1}})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  819. ! <<< Finished
  820. ! >>> Testing StringToChars using f(Mapping({"abc" : Mapping({%s : 1})}))
  821. ! f(Mapping({"abc" : Mapping({1 : 1})})):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  822. ! f(Mapping({"abc" : Mapping({u"\0" : 1})})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  823. ! f(Mapping({"abc" : Mapping({"\0" : 1})})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  824. ! <<< Finished
  825. ! >>> Testing *Iter* using f(Mapping({"abc" : %s}))
  826. ! f(Mapping({"abc" : FailingIter()})):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  827. ! f(Mapping({"abc" : FailingIterNext()})):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  828. ! <<< Finished
  829. ! >>> Testing ConvertFromPyObject using f(Mapping({"abc" : %s}))
  830. ! f(Mapping({"abc" : None})):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  831. ! f(Mapping({"abc" : {"": 1}})):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  832. ! f(Mapping({"abc" : FailingMapping()})):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  833. ! f(Mapping({"abc" : FailingMappingKey()})):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  834. ! <<< Finished
  835. ! >>> Testing *Iter* using f(%s)
  836. ! f(FailingIter()):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  837. ! f(FailingIterNext()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  838. ! <<< Finished
  839. ! >>> Testing ConvertFromPyObject using f(%s)
  840. ! f(None):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  841. ! f({"": 1}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  842. ! f(FailingMapping()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  843. ! f(FailingMappingKey()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  844. ! <<< Finished
  845. ! >>> Testing StringToChars using fd(self={%s : 1})
  846. ! fd(self={1 : 1}):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  847. ! fd(self={u"\0" : 1}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  848. ! fd(self={"\0" : 1}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  849. ! <<< Finished
  850. ! >>> Testing StringToChars using fd(self={"abc" : {%s : 1}})
  851. ! fd(self={"abc" : {1 : 1}}):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  852. ! fd(self={"abc" : {u"\0" : 1}}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  853. ! fd(self={"abc" : {"\0" : 1}}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  854. ! <<< Finished
  855. ! >>> Testing StringToChars using fd(self={"abc" : Mapping({%s : 1})})
  856. ! fd(self={"abc" : Mapping({1 : 1})}):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  857. ! fd(self={"abc" : Mapping({u"\0" : 1})}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  858. ! fd(self={"abc" : Mapping({"\0" : 1})}):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  859. ! <<< Finished
  860. ! >>> Testing *Iter* using fd(self={"abc" : %s})
  861. ! fd(self={"abc" : FailingIter()}):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  862. ! fd(self={"abc" : FailingIterNext()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  863. ! <<< Finished
  864. ! >>> Testing ConvertFromPyObject using fd(self={"abc" : %s})
  865. ! fd(self={"abc" : None}):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  866. ! fd(self={"abc" : {"": 1}}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  867. ! fd(self={"abc" : FailingMapping()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  868. ! fd(self={"abc" : FailingMappingKey()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  869. ! <<< Finished
  870. ! >>> Testing StringToChars using fd(self=Mapping({%s : 1}))
  871. ! fd(self=Mapping({1 : 1})):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  872. ! fd(self=Mapping({u"\0" : 1})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  873. ! fd(self=Mapping({"\0" : 1})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  874. ! <<< Finished
  875. ! >>> Testing StringToChars using fd(self=Mapping({"abc" : {%s : 1}}))
  876. ! fd(self=Mapping({"abc" : {1 : 1}})):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  877. ! fd(self=Mapping({"abc" : {u"\0" : 1}})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  878. ! fd(self=Mapping({"abc" : {"\0" : 1}})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  879. ! <<< Finished
  880. ! >>> Testing StringToChars using fd(self=Mapping({"abc" : Mapping({%s : 1})}))
  881. ! fd(self=Mapping({"abc" : Mapping({1 : 1})})):(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  882. ! fd(self=Mapping({"abc" : Mapping({u"\0" : 1})})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  883. ! fd(self=Mapping({"abc" : Mapping({"\0" : 1})})):(<type 'exceptions.TypeError'>, TypeError('expected string without null bytes',))
  884. ! <<< Finished
  885. ! >>> Testing *Iter* using fd(self=Mapping({"abc" : %s}))
  886. ! fd(self=Mapping({"abc" : FailingIter()})):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  887. ! fd(self=Mapping({"abc" : FailingIterNext()})):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  888. ! <<< Finished
  889. ! >>> Testing ConvertFromPyObject using fd(self=Mapping({"abc" : %s}))
  890. ! fd(self=Mapping({"abc" : None})):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  891. ! fd(self=Mapping({"abc" : {"": 1}})):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  892. ! fd(self=Mapping({"abc" : FailingMapping()})):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  893. ! fd(self=Mapping({"abc" : FailingMappingKey()})):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  894. ! <<< Finished
  895. ! >>> Testing *Iter* using fd(self=%s)
  896. ! fd(self=FailingIter()):(<type 'exceptions.TypeError'>, TypeError('unable to convert object to vim dictionary',))
  897. ! fd(self=FailingIterNext()):(<type 'exceptions.TypeError'>, TypeError('unable to convert object to vim dictionary',))
  898. ! <<< Finished
  899. ! >>> Testing ConvertFromPyObject using fd(self=%s)
  900. ! fd(self=None):(<type 'exceptions.TypeError'>, TypeError('unable to convert object to vim dictionary',))
  901. ! fd(self={"": 1}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  902. ! fd(self=FailingMapping()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  903. ! fd(self=FailingMappingKey()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  904. ! <<< Finished
  905. ! >>> Testing ConvertFromPyMapping using fd(self=%s)
  906. ! fd(self=[]):(<type 'exceptions.TypeError'>, TypeError('unable to convert object to vim dictionary',))
  907. ! <<< Finished
  908. ! > TabPage
  909. ! >> TabPageAttr
  910. ! vim.current.tabpage.xxx:(<type 'exceptions.AttributeError'>, AttributeError('xxx',))
  911. ! > TabList
  912. ! >> TabListItem
  913. ! vim.tabpages[1000]:(<type 'exceptions.IndexError'>, IndexError('no such tab page',))
  914. ! > Window
  915. ! >> WindowAttr
  916. ! vim.current.window.xxx:(<type 'exceptions.AttributeError'>, AttributeError('xxx',))
  917. ! >> WindowSetattr
  918. ! vim.current.window.buffer = 0:(<type 'exceptions.TypeError'>, TypeError('readonly attribute',))
  919. ! vim.current.window.cursor = (10000000000, 100000000):(<class 'vim.error'>, error('cursor position outside buffer',))
  920. ! vim.current.window.cursor = True:(<type 'exceptions.TypeError'>, TypeError('argument must be 2-item sequence, not bool',))
  921. ! vim.current.window.height = "abc":(<type 'exceptions.TypeError'>, TypeError('an integer is required',))
  922. ! vim.current.window.width  = "abc":(<type 'exceptions.TypeError'>, TypeError('an integer is required',))
  923. ! vim.current.window.xxxxxx = True:(<type 'exceptions.AttributeError'>, AttributeError('xxxxxx',))
  924. ! > WinList
  925. ! >> WinListItem
  926. ! vim.windows[1000]:(<type 'exceptions.IndexError'>, IndexError('no such window',))
  927. ! > Buffer
  928. ! >> StringToLine (indirect)
  929. ! vim.current.buffer[0] = "\na":(<class 'vim.error'>, error('string cannot contain newlines',))
  930. ! >> SetBufferLine (indirect)
  931. ! vim.current.buffer[0] = True:(<type 'exceptions.TypeError'>, TypeError('bad argument type for built-in operation',))
  932. ! >> SetBufferLines (indirect)
  933. ! vim.current.buffer[:] = True:(<type 'exceptions.TypeError'>, TypeError('bad argument type for built-in operation',))
  934. ! vim.current.buffer[:] = ["\na", "bc"]:(<class 'vim.error'>, error('string cannot contain newlines',))
  935. ! >> InsertBufferLines (indirect)
  936. ! vim.current.buffer.append(None):(<type 'exceptions.TypeError'>, TypeError('bad argument type for built-in operation',))
  937. ! vim.current.buffer.append(["\na", "bc"]):(<class 'vim.error'>, error('string cannot contain newlines',))
  938. ! vim.current.buffer.append("\nbc"):(<class 'vim.error'>, error('string cannot contain newlines',))
  939. ! >> RBItem
  940. ! vim.current.buffer[10000000000]:(<type 'exceptions.IndexError'>, IndexError('line number out of range',))
  941. ! >> RBAsItem
  942. ! vim.current.buffer[10000000000] = "":(<type 'exceptions.IndexError'>, IndexError('line number out of range',))
  943. ! >> BufferAttr
  944. ! vim.current.buffer.xxx:(<type 'exceptions.AttributeError'>, AttributeError('xxx',))
  945. ! >> BufferSetattr
  946. ! vim.current.buffer.name = True:(<type 'exceptions.TypeError'>, TypeError('object must be string',))
  947. ! vim.current.buffer.xxx = True:(<type 'exceptions.AttributeError'>, AttributeError('xxx',))
  948. ! >> BufferMark
  949. ! vim.current.buffer.mark(0):(<type 'exceptions.TypeError'>, TypeError('must be string, not int',))
  950. ! vim.current.buffer.mark("abc"):(<type 'exceptions.ValueError'>, ValueError('mark name must be a single character',))
  951. ! vim.current.buffer.mark("!"):(<class 'vim.error'>, error('invalid mark name',))
  952. ! >> BufferRange
  953. ! vim.current.buffer.range(1, 2, 3):(<type 'exceptions.TypeError'>, TypeError('function takes exactly 2 arguments (3 given)',))
  954. ! > BufMap
  955. ! >> BufMapItem
  956. ! vim.buffers[None]:(<type 'exceptions.TypeError'>, TypeError('key must be integer',))
  957. ! vim.buffers[100000000]:(<type 'exceptions.KeyError'>, KeyError(100000000,))
  958. ! > Current
  959. ! >> CurrentGetattr
  960. ! vim.current.xxx:(<type 'exceptions.AttributeError'>, AttributeError('xxx',))
  961. ! >> CurrentSetattr
  962. ! vim.current.line = True:(<type 'exceptions.TypeError'>, TypeError('bad argument type for built-in operation',))
  963. ! vim.current.buffer = True:(<type 'exceptions.TypeError'>, TypeError('expected vim.Buffer object',))
  964. ! vim.current.window = True:(<type 'exceptions.TypeError'>, TypeError('expected vim.Window object',))
  965. ! vim.current.tabpage = True:(<type 'exceptions.TypeError'>, TypeError('expected vim.TabPage object',))
  966. ! vim.current.xxx = True:(<type 'exceptions.AttributeError'>, AttributeError('xxx',))
  967. ! vim.command("throw 'abc'"):(<class 'vim.error'>, error('abc',))
  968. ! Exe("throw 'def'"):(<class 'vim.error'>, error('def',))
  969. ! vim.eval("Exe('throw ''ghi''')"):(<class 'vim.error'>, error('ghi',))
  970. ! vim.eval("Exe('echoerr ''jkl''')"):(<class 'vim.error'>, error('Vim(echoerr):jkl',))
  971. ! vim.eval("Exe('xxx_non_existent_command_xxx')"):(<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',))
  972. ! vim.bindeval("Exe('xxx_non_existent_command_xxx')"):(<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',))
  973. *** ../vim-7.3.1065/src/testdir/test87.in    2013-05-30 13:14:06.000000000 +0200
  974. --- src/testdir/test87.in    2013-05-30 13:25:22.000000000 +0200
  975. ***************
  976. *** 746,761 ****
  977.   :$put =string(py3eval('dl2'))
  978.   :$put =string(py3eval('df(2)'))
  979.   :"
  980. ! :" Test exceptions
  981. ! :fun Exe(e)
  982. ! :   execute a:e
  983.   :endfun
  984.   py3 << EOF
  985.   def ee(expr, g=globals(), l=locals()):
  986.       try:
  987. !         exec(expr, g, l)
  988.       except Exception as e:
  989. !         cb.append(repr((e.__class__, e)))
  990.   Exe = vim.bindeval('function("Exe")')
  991.   ee('vim.command("throw \'abc\'")')
  992.   ee('Exe("throw \'def\'")')
  993. --- 746,1026 ----
  994.   :$put =string(py3eval('dl2'))
  995.   :$put =string(py3eval('df(2)'))
  996.   :"
  997. ! :" Test errors
  998. ! :fun F() dict
  999. ! :endfun
  1000. ! :fun D()
  1001.   :endfun
  1002.   py3 << EOF
  1003.   def ee(expr, g=globals(), l=locals()):
  1004.       try:
  1005. !         try:
  1006. !             exec(expr, g, l)
  1007. !         except Exception as e:
  1008. !             cb.append(expr + ':' + repr((e.__class__, e)))
  1009. !         else:
  1010. !             cb.append(expr + ':NOT FAILED')
  1011.       except Exception as e:
  1012. !         cb.append(expr + '::' + repr((e.__class__, e)))
  1013. ! d = vim.Dictionary()
  1014. ! ned = vim.Dictionary(foo='bar', baz='abc')
  1015. ! dl = vim.Dictionary(a=1)
  1016. ! dl.locked = True
  1017. ! l = vim.List()
  1018. ! ll = vim.List('abc')
  1019. ! ll.locked = True
  1020. ! f = vim.Function('string')
  1021. ! fd = vim.Function('F')
  1022. ! fdel = vim.Function('D')
  1023. ! vim.command('delfunction D')
  1024. ! def subexpr_test(expr, name, subexprs):
  1025. !     cb.append('>>> Testing %s using %s' % (name, expr))
  1026. !     for subexpr in subexprs:
  1027. !         ee(expr % subexpr)
  1028. !     cb.append('<<< Finished')
  1029. ! def stringtochars_test(expr):
  1030. !     return subexpr_test(expr, 'StringToChars', (
  1031. !         '1',       # Fail type checks
  1032. !         'u"\\0"',  # Fail PyString_AsStringAndSize(bytes, , NULL) check
  1033. !         '"\\0"',   # Fail PyString_AsStringAndSize(object, , NULL) check
  1034. !     ))
  1035. ! class Mapping(object):
  1036. !     def __init__(self, d):
  1037. !         self.d = d
  1038. !     def __getitem__(self, key):
  1039. !         return self.d[key]
  1040. !     def keys(self):
  1041. !         return self.d.keys()
  1042. !     def items(self):
  1043. !         return self.d.items()
  1044. ! def convertfrompyobject_test(expr, recurse=True):
  1045. !     # pydict_to_tv
  1046. !     stringtochars_test(expr % '{%s : 1}')
  1047. !     if recurse:
  1048. !         convertfrompyobject_test(expr % '{"abc" : %s}', False)
  1049. !     # pymap_to_tv
  1050. !     stringtochars_test(expr % 'Mapping({%s : 1})')
  1051. !     if recurse:
  1052. !         convertfrompyobject_test(expr % 'Mapping({"abc" : %s})', False)
  1053. !     # pyseq_to_tv
  1054. !     iter_test(expr)
  1055. !     return subexpr_test(expr, 'ConvertFromPyObject', (
  1056. !         'None',                 # Not conversible
  1057. !         '{"": 1}',              # Empty key not allowed
  1058. !         'FailingMapping()',     #
  1059. !         'FailingMappingKey()',  #
  1060. !     ))
  1061. ! def convertfrompymapping_test(expr):
  1062. !     convertfrompyobject_test(expr)
  1063. !     return subexpr_test(expr, 'ConvertFromPyMapping', (
  1064. !         '[]',
  1065. !     ))
  1066. ! def iter_test(expr):
  1067. !     return subexpr_test(expr, '*Iter*', (
  1068. !         'FailingIter()',
  1069. !         'FailingIterNext()',
  1070. !     ))
  1071. ! class FailingTrue(object):
  1072. !     def __bool__(self):
  1073. !         raise NotImplementedError
  1074. ! class FailingIter(object):
  1075. !     def __iter__(self):
  1076. !         raise NotImplementedError
  1077. ! class FailingIterNext(object):
  1078. !     def __iter__(self):
  1079. !         return self
  1080. !     def __next__(self):
  1081. !         raise NotImplementedError
  1082. ! class FailingMappingKey(object):
  1083. !     def __getitem__(self, item):
  1084. !         raise NotImplementedError
  1085. !     def keys(self):
  1086. !         return list("abc")
  1087. ! class FailingMapping(object):
  1088. !     def __getitem__(self):
  1089. !         raise NotImplementedError
  1090. !     def keys(self):
  1091. !         raise NotImplementedError
  1092. ! class FailingList(list):
  1093. !     def __getitem__(self, idx):
  1094. !         if i == 2:
  1095. !             raise NotImplementedError
  1096. !         else:
  1097. !             return super(FailingList, self).__getitem__(idx)
  1098. ! cb.append("> Output")
  1099. ! cb.append(">> OutputSetattr")
  1100. ! ee('del sys.stdout.softspace')
  1101. ! ee('sys.stdout.softspace = []')
  1102. ! ee('sys.stdout.attr = None')
  1103. ! cb.append(">> OutputWrite")
  1104. ! ee('sys.stdout.write(None)')
  1105. ! cb.append(">> OutputWriteLines")
  1106. ! ee('sys.stdout.writelines(None)')
  1107. ! ee('sys.stdout.writelines([1])')
  1108. ! iter_test('sys.stdout.writelines(%s)')
  1109. ! cb.append("> VimCommand")
  1110. ! ee('vim.command(1)')
  1111. ! #! Not checked: vim->python exceptions translating: checked later
  1112. ! cb.append("> VimToPython")
  1113. ! #! Not checked: everything: needs errors in internal python functions
  1114. ! cb.append("> VimEval")
  1115. ! ee('vim.eval(1)')
  1116. ! #! Not checked: everything: needs errors in internal python functions
  1117. ! cb.append("> VimEvalPy")
  1118. ! ee('vim.bindeval(1)')
  1119. ! #! Not checked: vim->python exceptions translating: checked later
  1120. ! cb.append("> VimStrwidth")
  1121. ! ee('vim.strwidth(1)')
  1122. ! cb.append("> Dictionary")
  1123. ! cb.append(">> DictionaryConstructor")
  1124. ! ee('vim.Dictionary("abc")')
  1125. ! ##! Not checked: py_dict_alloc failure
  1126. ! cb.append(">> DictionarySetattr")
  1127. ! ee('del d.locked')
  1128. ! ee('d.locked = FailingTrue()')
  1129. ! ee('vim.vvars.locked = False')
  1130. ! ee('d.scope = True')
  1131. ! ee('d.xxx = True')
  1132. ! cb.append(">> _DictionaryItem")
  1133. ! ee('d.get("a", 2, 3)')
  1134. ! stringtochars_test('d.get(%s)')
  1135. ! ee('d.pop("a")')
  1136. ! ee('dl.pop("a")')
  1137. ! cb.append(">> DictionaryIterNext")
  1138. ! ee('for i in ned: ned["a"] = 1')
  1139. ! cb.append(">> DictionaryAssItem")
  1140. ! ee('dl["b"] = 1')
  1141. ! stringtochars_test('d[%s] = 1')
  1142. ! convertfrompyobject_test('d["a"] = %s')
  1143. ! cb.append(">> DictionaryUpdate")
  1144. ! cb.append(">>> kwargs")
  1145. ! cb.append(">>> iter")
  1146. ! ee('d.update(FailingMapping())')
  1147. ! ee('d.update([FailingIterNext()])')
  1148. ! iter_test('d.update(%s)')
  1149. ! convertfrompyobject_test('d.update(%s)')
  1150. ! stringtochars_test('d.update(((%s, 0),))')
  1151. ! convertfrompyobject_test('d.update((("a", %s),))')
  1152. ! cb.append(">> DictionaryPopItem")
  1153. ! ee('d.popitem(1, 2)')
  1154. ! cb.append(">> DictionaryHasKey")
  1155. ! ee('d.has_key()')
  1156. ! cb.append("> List")
  1157. ! cb.append(">> ListConstructor")
  1158. ! ee('vim.List(1, 2)')
  1159. ! ee('vim.List(a=1)')
  1160. ! iter_test('vim.List(%s)')
  1161. ! convertfrompyobject_test('vim.List([%s])')
  1162. ! cb.append(">> ListItem")
  1163. ! ee('l[1000]')
  1164. ! cb.append(">> ListAssItem")
  1165. ! ee('ll[1] = 2')
  1166. ! ee('l[1000] = 3')
  1167. ! cb.append(">> ListAssSlice")
  1168. ! ee('ll[1:100] = "abc"')
  1169. ! iter_test('l[:] = %s')
  1170. ! convertfrompyobject_test('l[:] = [%s]')
  1171. ! cb.append(">> ListConcatInPlace")
  1172. ! iter_test('l.extend(%s)')
  1173. ! convertfrompyobject_test('l.extend([%s])')
  1174. ! cb.append(">> ListSetattr")
  1175. ! ee('del l.locked')
  1176. ! ee('l.locked = FailingTrue()')
  1177. ! ee('l.xxx = True')
  1178. ! cb.append("> Function")
  1179. ! cb.append(">> FunctionConstructor")
  1180. ! ee('vim.Function("123")')
  1181. ! ee('vim.Function("xxx_non_existent_function_xxx")')
  1182. ! ee('vim.Function("xxx#non#existent#function#xxx")')
  1183. ! cb.append(">> FunctionCall")
  1184. ! convertfrompyobject_test('f(%s)')
  1185. ! convertfrompymapping_test('fd(self=%s)')
  1186. ! cb.append("> TabPage")
  1187. ! cb.append(">> TabPageAttr")
  1188. ! ee('vim.current.tabpage.xxx')
  1189. ! cb.append("> TabList")
  1190. ! cb.append(">> TabListItem")
  1191. ! ee('vim.tabpages[1000]')
  1192. ! cb.append("> Window")
  1193. ! cb.append(">> WindowAttr")
  1194. ! ee('vim.current.window.xxx')
  1195. ! cb.append(">> WindowSetattr")
  1196. ! ee('vim.current.window.buffer = 0')
  1197. ! ee('vim.current.window.cursor = (10000000000, 100000000)')
  1198. ! ee('vim.current.window.cursor = True')
  1199. ! ee('vim.current.window.height = "abc"')
  1200. ! ee('vim.current.window.width  = "abc"')
  1201. ! ee('vim.current.window.xxxxxx = True')
  1202. ! cb.append("> WinList")
  1203. ! cb.append(">> WinListItem")
  1204. ! ee('vim.windows[1000]')
  1205. ! cb.append("> Buffer")
  1206. ! cb.append(">> StringToLine (indirect)")
  1207. ! ee('vim.current.buffer[0] = "\\na"')
  1208. ! cb.append(">> SetBufferLine (indirect)")
  1209. ! ee('vim.current.buffer[0] = True')
  1210. ! cb.append(">> SetBufferLines (indirect)")
  1211. ! ee('vim.current.buffer[:] = True')
  1212. ! ee('vim.current.buffer[:] = ["\\na", "bc"]')
  1213. ! cb.append(">> InsertBufferLines (indirect)")
  1214. ! ee('vim.current.buffer.append(None)')
  1215. ! ee('vim.current.buffer.append(["\\na", "bc"])')
  1216. ! ee('vim.current.buffer.append("\\nbc")')
  1217. ! cb.append(">> RBItem")
  1218. ! ee('vim.current.buffer[10000000000]')
  1219. ! cb.append(">> RBAsItem")
  1220. ! ee('vim.current.buffer[10000000000] = ""')
  1221. ! cb.append(">> BufferAttr")
  1222. ! ee('vim.current.buffer.xxx')
  1223. ! cb.append(">> BufferSetattr")
  1224. ! ee('vim.current.buffer.name = True')
  1225. ! ee('vim.current.buffer.xxx = True')
  1226. ! cb.append(">> BufferMark")
  1227. ! ee('vim.current.buffer.mark(0)')
  1228. ! ee('vim.current.buffer.mark("abc")')
  1229. ! ee('vim.current.buffer.mark("!")')
  1230. ! cb.append(">> BufferRange")
  1231. ! ee('vim.current.buffer.range(1, 2, 3)')
  1232. ! cb.append("> BufMap")
  1233. ! cb.append(">> BufMapItem")
  1234. ! ee('vim.buffers[None]')
  1235. ! ee('vim.buffers[100000000]')
  1236. ! cb.append("> Current")
  1237. ! cb.append(">> CurrentGetattr")
  1238. ! ee('vim.current.xxx')
  1239. ! cb.append(">> CurrentSetattr")
  1240. ! ee('vim.current.line = True')
  1241. ! ee('vim.current.buffer = True')
  1242. ! ee('vim.current.window = True')
  1243. ! ee('vim.current.tabpage = True')
  1244. ! ee('vim.current.xxx = True')
  1245. ! EOF
  1246. ! :"
  1247. ! :" Test exceptions
  1248. ! :fun Exe(e)
  1249. ! :   execute a:e
  1250. ! :endfun
  1251. ! py3 << EOF
  1252.   Exe = vim.bindeval('function("Exe")')
  1253.   ee('vim.command("throw \'abc\'")')
  1254.   ee('Exe("throw \'def\'")')
  1255. *** ../vim-7.3.1065/src/testdir/test87.ok    2013-05-30 13:14:06.000000000 +0200
  1256. --- src/testdir/test87.ok    2013-05-30 13:25:22.000000000 +0200
  1257. ***************
  1258. *** 418,426 ****
  1259.   ['a', 'b', 'c']
  1260.   [2, 2]
  1261.   [2, 2]
  1262. ! (<class 'vim.error'>, error('abc',))
  1263. ! (<class 'vim.error'>, error('def',))
  1264. ! (<class 'vim.error'>, error('ghi',))
  1265. ! (<class 'vim.error'>, error('Vim(echoerr):jkl',))
  1266. ! (<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',))
  1267. ! (<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',))
  1268. --- 418,1070 ----
  1269.   ['a', 'b', 'c']
  1270.   [2, 2]
  1271.   [2, 2]
  1272. ! > Output
  1273. ! >> OutputSetattr
  1274. ! del sys.stdout.softspace:(<class 'AttributeError'>, AttributeError("can't delete OutputObject attributes",))
  1275. ! sys.stdout.softspace = []:(<class 'TypeError'>, TypeError('softspace must be an integer',))
  1276. ! sys.stdout.attr = None:(<class 'AttributeError'>, AttributeError('invalid attribute',))
  1277. ! >> OutputWrite
  1278. ! sys.stdout.write(None):(<class 'TypeError'>, TypeError("Can't convert 'NoneType' object to str implicitly",))
  1279. ! >> OutputWriteLines
  1280. ! sys.stdout.writelines(None):(<class 'TypeError'>, TypeError("'NoneType' object is not iterable",))
  1281. ! sys.stdout.writelines([1]):(<class 'TypeError'>, TypeError('writelines() requires list of strings',))
  1282. ! >>> Testing *Iter* using sys.stdout.writelines(%s)
  1283. ! sys.stdout.writelines(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError())
  1284. ! sys.stdout.writelines(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError())
  1285. ! <<< Finished
  1286. ! > VimCommand
  1287. ! vim.command(1):(<class 'TypeError'>, TypeError('must be str, not int',))
  1288. ! > VimToPython
  1289. ! > VimEval
  1290. ! vim.eval(1):(<class 'TypeError'>, TypeError('must be str, not int',))
  1291. ! > VimEvalPy
  1292. ! vim.bindeval(1):(<class 'TypeError'>, TypeError('must be str, not int',))
  1293. ! > VimStrwidth
  1294. ! vim.strwidth(1):(<class 'TypeError'>, TypeError('must be str, not int',))
  1295. ! > Dictionary
  1296. ! >> DictionaryConstructor
  1297. ! vim.Dictionary("abc"):(<class 'ValueError'>, ValueError('expected sequence element of size 2',))
  1298. ! >> DictionarySetattr
  1299. ! del d.locked:(<class 'AttributeError'>, AttributeError('cannot delete vim.Dictionary attributes',))
  1300. ! d.locked = FailingTrue():(<class 'NotImplementedError'>, NotImplementedError())
  1301. ! vim.vvars.locked = False:(<class 'TypeError'>, TypeError('cannot modify fixed dictionary',))
  1302. ! d.scope = True:(<class 'AttributeError'>, AttributeError('cannot set this attribute',))
  1303. ! d.xxx = True:(<class 'AttributeError'>, AttributeError('cannot set this attribute',))
  1304. ! >> _DictionaryItem
  1305. ! d.get("a", 2, 3):(<class 'TypeError'>, TypeError('function takes at most 2 arguments (3 given)',))
  1306. ! >>> Testing StringToChars using d.get(%s)
  1307. ! d.get(1):(<class 'TypeError'>, TypeError('object must be string',))
  1308. ! d.get(u"\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1309. ! d.get("\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1310. ! <<< Finished
  1311. ! d.pop("a"):(<class 'KeyError'>, KeyError('a',))
  1312. ! dl.pop("a"):(<class 'vim.error'>, error('dict is locked',))
  1313. ! >> DictionaryIterNext
  1314. ! for i in ned: ned["a"] = 1:(<class 'RuntimeError'>, RuntimeError('hashtab changed during iteration',))
  1315. ! >> DictionaryAssItem
  1316. ! dl["b"] = 1:(<class 'vim.error'>, error('dict is locked',))
  1317. ! >>> Testing StringToChars using d[%s] = 1
  1318. ! d[1] = 1:(<class 'TypeError'>, TypeError('object must be string',))
  1319. ! d[u"\0"] = 1:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1320. ! d["\0"] = 1:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1321. ! <<< Finished
  1322. ! >>> Testing StringToChars using d["a"] = {%s : 1}
  1323. ! d["a"] = {1 : 1}:(<class 'TypeError'>, TypeError('object must be string',))
  1324. ! d["a"] = {u"\0" : 1}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1325. ! d["a"] = {"\0" : 1}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1326. ! <<< Finished
  1327. ! >>> Testing StringToChars using d["a"] = {"abc" : {%s : 1}}
  1328. ! d["a"] = {"abc" : {1 : 1}}:(<class 'TypeError'>, TypeError('object must be string',))
  1329. ! d["a"] = {"abc" : {u"\0" : 1}}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1330. ! d["a"] = {"abc" : {"\0" : 1}}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1331. ! <<< Finished
  1332. ! >>> Testing StringToChars using d["a"] = {"abc" : Mapping({%s : 1})}
  1333. ! d["a"] = {"abc" : Mapping({1 : 1})}:(<class 'TypeError'>, TypeError('object must be string',))
  1334. ! d["a"] = {"abc" : Mapping({u"\0" : 1})}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1335. ! d["a"] = {"abc" : Mapping({"\0" : 1})}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1336. ! <<< Finished
  1337. ! >>> Testing *Iter* using d["a"] = {"abc" : %s}
  1338. ! d["a"] = {"abc" : FailingIter()}:(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1339. ! d["a"] = {"abc" : FailingIterNext()}:(<class 'NotImplementedError'>, NotImplementedError())
  1340. ! <<< Finished
  1341. ! >>> Testing ConvertFromPyObject using d["a"] = {"abc" : %s}
  1342. ! d["a"] = {"abc" : None}:(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1343. ! d["a"] = {"abc" : {"": 1}}:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1344. ! d["a"] = {"abc" : FailingMapping()}:(<class 'NotImplementedError'>, NotImplementedError())
  1345. ! d["a"] = {"abc" : FailingMappingKey()}:(<class 'NotImplementedError'>, NotImplementedError())
  1346. ! <<< Finished
  1347. ! >>> Testing StringToChars using d["a"] = Mapping({%s : 1})
  1348. ! d["a"] = Mapping({1 : 1}):(<class 'TypeError'>, TypeError('object must be string',))
  1349. ! d["a"] = Mapping({u"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1350. ! d["a"] = Mapping({"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1351. ! <<< Finished
  1352. ! >>> Testing StringToChars using d["a"] = Mapping({"abc" : {%s : 1}})
  1353. ! d["a"] = Mapping({"abc" : {1 : 1}}):(<class 'TypeError'>, TypeError('object must be string',))
  1354. ! d["a"] = Mapping({"abc" : {u"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1355. ! d["a"] = Mapping({"abc" : {"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1356. ! <<< Finished
  1357. ! >>> Testing StringToChars using d["a"] = Mapping({"abc" : Mapping({%s : 1})})
  1358. ! d["a"] = Mapping({"abc" : Mapping({1 : 1})}):(<class 'TypeError'>, TypeError('object must be string',))
  1359. ! d["a"] = Mapping({"abc" : Mapping({u"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1360. ! d["a"] = Mapping({"abc" : Mapping({"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1361. ! <<< Finished
  1362. ! >>> Testing *Iter* using d["a"] = Mapping({"abc" : %s})
  1363. ! d["a"] = Mapping({"abc" : FailingIter()}):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1364. ! d["a"] = Mapping({"abc" : FailingIterNext()}):(<class 'NotImplementedError'>, NotImplementedError())
  1365. ! <<< Finished
  1366. ! >>> Testing ConvertFromPyObject using d["a"] = Mapping({"abc" : %s})
  1367. ! d["a"] = Mapping({"abc" : None}):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1368. ! d["a"] = Mapping({"abc" : {"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1369. ! d["a"] = Mapping({"abc" : FailingMapping()}):(<class 'NotImplementedError'>, NotImplementedError())
  1370. ! d["a"] = Mapping({"abc" : FailingMappingKey()}):(<class 'NotImplementedError'>, NotImplementedError())
  1371. ! <<< Finished
  1372. ! >>> Testing *Iter* using d["a"] = %s
  1373. ! d["a"] = FailingIter():(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1374. ! d["a"] = FailingIterNext():(<class 'NotImplementedError'>, NotImplementedError())
  1375. ! <<< Finished
  1376. ! >>> Testing ConvertFromPyObject using d["a"] = %s
  1377. ! d["a"] = None:(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1378. ! d["a"] = {"": 1}:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1379. ! d["a"] = FailingMapping():(<class 'NotImplementedError'>, NotImplementedError())
  1380. ! d["a"] = FailingMappingKey():(<class 'NotImplementedError'>, NotImplementedError())
  1381. ! <<< Finished
  1382. ! >> DictionaryUpdate
  1383. ! >>> kwargs
  1384. ! >>> iter
  1385. ! d.update(FailingMapping()):(<class 'NotImplementedError'>, NotImplementedError())
  1386. ! d.update([FailingIterNext()]):(<class 'NotImplementedError'>, NotImplementedError())
  1387. ! >>> Testing *Iter* using d.update(%s)
  1388. ! d.update(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError())
  1389. ! d.update(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError())
  1390. ! <<< Finished
  1391. ! >>> Testing StringToChars using d.update({%s : 1})
  1392. ! d.update({1 : 1}):(<class 'TypeError'>, TypeError('object must be string',))
  1393. ! d.update({u"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1394. ! d.update({"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1395. ! <<< Finished
  1396. ! >>> Testing StringToChars using d.update({"abc" : {%s : 1}})
  1397. ! d.update({"abc" : {1 : 1}}):(<class 'TypeError'>, TypeError('object must be string',))
  1398. ! d.update({"abc" : {u"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1399. ! d.update({"abc" : {"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1400. ! <<< Finished
  1401. ! >>> Testing StringToChars using d.update({"abc" : Mapping({%s : 1})})
  1402. ! d.update({"abc" : Mapping({1 : 1})}):(<class 'TypeError'>, TypeError('object must be string',))
  1403. ! d.update({"abc" : Mapping({u"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1404. ! d.update({"abc" : Mapping({"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1405. ! <<< Finished
  1406. ! >>> Testing *Iter* using d.update({"abc" : %s})
  1407. ! d.update({"abc" : FailingIter()}):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1408. ! d.update({"abc" : FailingIterNext()}):(<class 'NotImplementedError'>, NotImplementedError())
  1409. ! <<< Finished
  1410. ! >>> Testing ConvertFromPyObject using d.update({"abc" : %s})
  1411. ! d.update({"abc" : None}):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1412. ! d.update({"abc" : {"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1413. ! d.update({"abc" : FailingMapping()}):(<class 'NotImplementedError'>, NotImplementedError())
  1414. ! d.update({"abc" : FailingMappingKey()}):(<class 'NotImplementedError'>, NotImplementedError())
  1415. ! <<< Finished
  1416. ! >>> Testing StringToChars using d.update(Mapping({%s : 1}))
  1417. ! d.update(Mapping({1 : 1})):(<class 'TypeError'>, TypeError('object must be string',))
  1418. ! d.update(Mapping({u"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1419. ! d.update(Mapping({"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1420. ! <<< Finished
  1421. ! >>> Testing StringToChars using d.update(Mapping({"abc" : {%s : 1}}))
  1422. ! d.update(Mapping({"abc" : {1 : 1}})):(<class 'TypeError'>, TypeError('object must be string',))
  1423. ! d.update(Mapping({"abc" : {u"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1424. ! d.update(Mapping({"abc" : {"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1425. ! <<< Finished
  1426. ! >>> Testing StringToChars using d.update(Mapping({"abc" : Mapping({%s : 1})}))
  1427. ! d.update(Mapping({"abc" : Mapping({1 : 1})})):(<class 'TypeError'>, TypeError('object must be string',))
  1428. ! d.update(Mapping({"abc" : Mapping({u"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1429. ! d.update(Mapping({"abc" : Mapping({"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1430. ! <<< Finished
  1431. ! >>> Testing *Iter* using d.update(Mapping({"abc" : %s}))
  1432. ! d.update(Mapping({"abc" : FailingIter()})):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1433. ! d.update(Mapping({"abc" : FailingIterNext()})):(<class 'NotImplementedError'>, NotImplementedError())
  1434. ! <<< Finished
  1435. ! >>> Testing ConvertFromPyObject using d.update(Mapping({"abc" : %s}))
  1436. ! d.update(Mapping({"abc" : None})):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1437. ! d.update(Mapping({"abc" : {"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1438. ! d.update(Mapping({"abc" : FailingMapping()})):(<class 'NotImplementedError'>, NotImplementedError())
  1439. ! d.update(Mapping({"abc" : FailingMappingKey()})):(<class 'NotImplementedError'>, NotImplementedError())
  1440. ! <<< Finished
  1441. ! >>> Testing *Iter* using d.update(%s)
  1442. ! d.update(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError())
  1443. ! d.update(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError())
  1444. ! <<< Finished
  1445. ! >>> Testing ConvertFromPyObject using d.update(%s)
  1446. ! d.update(None):(<class 'TypeError'>, TypeError("'NoneType' object is not iterable",))
  1447. ! d.update({"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1448. ! d.update(FailingMapping()):(<class 'NotImplementedError'>, NotImplementedError())
  1449. ! d.update(FailingMappingKey()):(<class 'NotImplementedError'>, NotImplementedError())
  1450. ! <<< Finished
  1451. ! >>> Testing StringToChars using d.update(((%s, 0),))
  1452. ! d.update(((1, 0),)):(<class 'TypeError'>, TypeError('object must be string',))
  1453. ! d.update(((u"\0", 0),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1454. ! d.update((("\0", 0),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1455. ! <<< Finished
  1456. ! >>> Testing StringToChars using d.update((("a", {%s : 1}),))
  1457. ! d.update((("a", {1 : 1}),)):(<class 'TypeError'>, TypeError('object must be string',))
  1458. ! d.update((("a", {u"\0" : 1}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1459. ! d.update((("a", {"\0" : 1}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1460. ! <<< Finished
  1461. ! >>> Testing StringToChars using d.update((("a", {"abc" : {%s : 1}}),))
  1462. ! d.update((("a", {"abc" : {1 : 1}}),)):(<class 'TypeError'>, TypeError('object must be string',))
  1463. ! d.update((("a", {"abc" : {u"\0" : 1}}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1464. ! d.update((("a", {"abc" : {"\0" : 1}}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1465. ! <<< Finished
  1466. ! >>> Testing StringToChars using d.update((("a", {"abc" : Mapping({%s : 1})}),))
  1467. ! d.update((("a", {"abc" : Mapping({1 : 1})}),)):(<class 'TypeError'>, TypeError('object must be string',))
  1468. ! d.update((("a", {"abc" : Mapping({u"\0" : 1})}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1469. ! d.update((("a", {"abc" : Mapping({"\0" : 1})}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1470. ! <<< Finished
  1471. ! >>> Testing *Iter* using d.update((("a", {"abc" : %s}),))
  1472. ! d.update((("a", {"abc" : FailingIter()}),)):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1473. ! d.update((("a", {"abc" : FailingIterNext()}),)):(<class 'NotImplementedError'>, NotImplementedError())
  1474. ! <<< Finished
  1475. ! >>> Testing ConvertFromPyObject using d.update((("a", {"abc" : %s}),))
  1476. ! d.update((("a", {"abc" : None}),)):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1477. ! d.update((("a", {"abc" : {"": 1}}),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1478. ! d.update((("a", {"abc" : FailingMapping()}),)):(<class 'NotImplementedError'>, NotImplementedError())
  1479. ! d.update((("a", {"abc" : FailingMappingKey()}),)):(<class 'NotImplementedError'>, NotImplementedError())
  1480. ! <<< Finished
  1481. ! >>> Testing StringToChars using d.update((("a", Mapping({%s : 1})),))
  1482. ! d.update((("a", Mapping({1 : 1})),)):(<class 'TypeError'>, TypeError('object must be string',))
  1483. ! d.update((("a", Mapping({u"\0" : 1})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1484. ! d.update((("a", Mapping({"\0" : 1})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1485. ! <<< Finished
  1486. ! >>> Testing StringToChars using d.update((("a", Mapping({"abc" : {%s : 1}})),))
  1487. ! d.update((("a", Mapping({"abc" : {1 : 1}})),)):(<class 'TypeError'>, TypeError('object must be string',))
  1488. ! d.update((("a", Mapping({"abc" : {u"\0" : 1}})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1489. ! d.update((("a", Mapping({"abc" : {"\0" : 1}})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1490. ! <<< Finished
  1491. ! >>> Testing StringToChars using d.update((("a", Mapping({"abc" : Mapping({%s : 1})})),))
  1492. ! d.update((("a", Mapping({"abc" : Mapping({1 : 1})})),)):(<class 'TypeError'>, TypeError('object must be string',))
  1493. ! d.update((("a", Mapping({"abc" : Mapping({u"\0" : 1})})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1494. ! d.update((("a", Mapping({"abc" : Mapping({"\0" : 1})})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1495. ! <<< Finished
  1496. ! >>> Testing *Iter* using d.update((("a", Mapping({"abc" : %s})),))
  1497. ! d.update((("a", Mapping({"abc" : FailingIter()})),)):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1498. ! d.update((("a", Mapping({"abc" : FailingIterNext()})),)):(<class 'NotImplementedError'>, NotImplementedError())
  1499. ! <<< Finished
  1500. ! >>> Testing ConvertFromPyObject using d.update((("a", Mapping({"abc" : %s})),))
  1501. ! d.update((("a", Mapping({"abc" : None})),)):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1502. ! d.update((("a", Mapping({"abc" : {"": 1}})),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1503. ! d.update((("a", Mapping({"abc" : FailingMapping()})),)):(<class 'NotImplementedError'>, NotImplementedError())
  1504. ! d.update((("a", Mapping({"abc" : FailingMappingKey()})),)):(<class 'NotImplementedError'>, NotImplementedError())
  1505. ! <<< Finished
  1506. ! >>> Testing *Iter* using d.update((("a", %s),))
  1507. ! d.update((("a", FailingIter()),)):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1508. ! d.update((("a", FailingIterNext()),)):(<class 'NotImplementedError'>, NotImplementedError())
  1509. ! <<< Finished
  1510. ! >>> Testing ConvertFromPyObject using d.update((("a", %s),))
  1511. ! d.update((("a", None),)):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1512. ! d.update((("a", {"": 1}),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1513. ! d.update((("a", FailingMapping()),)):(<class 'NotImplementedError'>, NotImplementedError())
  1514. ! d.update((("a", FailingMappingKey()),)):(<class 'NotImplementedError'>, NotImplementedError())
  1515. ! <<< Finished
  1516. ! >> DictionaryPopItem
  1517. ! d.popitem(1, 2):(<class 'TypeError'>, TypeError('function takes exactly 1 argument (2 given)',))
  1518. ! >> DictionaryHasKey
  1519. ! d.has_key():(<class 'TypeError'>, TypeError('function takes exactly 1 argument (0 given)',))
  1520. ! > List
  1521. ! >> ListConstructor
  1522. ! vim.List(1, 2):(<class 'TypeError'>, TypeError('function takes at most 1 argument (2 given)',))
  1523. ! vim.List(a=1):(<class 'TypeError'>, TypeError('list constructor does not accept keyword arguments',))
  1524. ! >>> Testing *Iter* using vim.List(%s)
  1525. ! vim.List(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError())
  1526. ! vim.List(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError())
  1527. ! <<< Finished
  1528. ! >>> Testing StringToChars using vim.List([{%s : 1}])
  1529. ! vim.List([{1 : 1}]):(<class 'TypeError'>, TypeError('object must be string',))
  1530. ! vim.List([{u"\0" : 1}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1531. ! vim.List([{"\0" : 1}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1532. ! <<< Finished
  1533. ! >>> Testing StringToChars using vim.List([{"abc" : {%s : 1}}])
  1534. ! vim.List([{"abc" : {1 : 1}}]):(<class 'TypeError'>, TypeError('object must be string',))
  1535. ! vim.List([{"abc" : {u"\0" : 1}}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1536. ! vim.List([{"abc" : {"\0" : 1}}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1537. ! <<< Finished
  1538. ! >>> Testing StringToChars using vim.List([{"abc" : Mapping({%s : 1})}])
  1539. ! vim.List([{"abc" : Mapping({1 : 1})}]):(<class 'TypeError'>, TypeError('object must be string',))
  1540. ! vim.List([{"abc" : Mapping({u"\0" : 1})}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1541. ! vim.List([{"abc" : Mapping({"\0" : 1})}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1542. ! <<< Finished
  1543. ! >>> Testing *Iter* using vim.List([{"abc" : %s}])
  1544. ! vim.List([{"abc" : FailingIter()}]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1545. ! vim.List([{"abc" : FailingIterNext()}]):(<class 'NotImplementedError'>, NotImplementedError())
  1546. ! <<< Finished
  1547. ! >>> Testing ConvertFromPyObject using vim.List([{"abc" : %s}])
  1548. ! vim.List([{"abc" : None}]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1549. ! vim.List([{"abc" : {"": 1}}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1550. ! vim.List([{"abc" : FailingMapping()}]):(<class 'NotImplementedError'>, NotImplementedError())
  1551. ! vim.List([{"abc" : FailingMappingKey()}]):(<class 'NotImplementedError'>, NotImplementedError())
  1552. ! <<< Finished
  1553. ! >>> Testing StringToChars using vim.List([Mapping({%s : 1})])
  1554. ! vim.List([Mapping({1 : 1})]):(<class 'TypeError'>, TypeError('object must be string',))
  1555. ! vim.List([Mapping({u"\0" : 1})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1556. ! vim.List([Mapping({"\0" : 1})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1557. ! <<< Finished
  1558. ! >>> Testing StringToChars using vim.List([Mapping({"abc" : {%s : 1}})])
  1559. ! vim.List([Mapping({"abc" : {1 : 1}})]):(<class 'TypeError'>, TypeError('object must be string',))
  1560. ! vim.List([Mapping({"abc" : {u"\0" : 1}})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1561. ! vim.List([Mapping({"abc" : {"\0" : 1}})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1562. ! <<< Finished
  1563. ! >>> Testing StringToChars using vim.List([Mapping({"abc" : Mapping({%s : 1})})])
  1564. ! vim.List([Mapping({"abc" : Mapping({1 : 1})})]):(<class 'TypeError'>, TypeError('object must be string',))
  1565. ! vim.List([Mapping({"abc" : Mapping({u"\0" : 1})})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1566. ! vim.List([Mapping({"abc" : Mapping({"\0" : 1})})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1567. ! <<< Finished
  1568. ! >>> Testing *Iter* using vim.List([Mapping({"abc" : %s})])
  1569. ! vim.List([Mapping({"abc" : FailingIter()})]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1570. ! vim.List([Mapping({"abc" : FailingIterNext()})]):(<class 'NotImplementedError'>, NotImplementedError())
  1571. ! <<< Finished
  1572. ! >>> Testing ConvertFromPyObject using vim.List([Mapping({"abc" : %s})])
  1573. ! vim.List([Mapping({"abc" : None})]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1574. ! vim.List([Mapping({"abc" : {"": 1}})]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1575. ! vim.List([Mapping({"abc" : FailingMapping()})]):(<class 'NotImplementedError'>, NotImplementedError())
  1576. ! vim.List([Mapping({"abc" : FailingMappingKey()})]):(<class 'NotImplementedError'>, NotImplementedError())
  1577. ! <<< Finished
  1578. ! >>> Testing *Iter* using vim.List([%s])
  1579. ! vim.List([FailingIter()]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1580. ! vim.List([FailingIterNext()]):(<class 'NotImplementedError'>, NotImplementedError())
  1581. ! <<< Finished
  1582. ! >>> Testing ConvertFromPyObject using vim.List([%s])
  1583. ! vim.List([None]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1584. ! vim.List([{"": 1}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1585. ! vim.List([FailingMapping()]):(<class 'NotImplementedError'>, NotImplementedError())
  1586. ! vim.List([FailingMappingKey()]):(<class 'NotImplementedError'>, NotImplementedError())
  1587. ! <<< Finished
  1588. ! >> ListItem
  1589. ! l[1000]:(<class 'IndexError'>, IndexError('list index out of range',))
  1590. ! >> ListAssItem
  1591. ! ll[1] = 2:(<class 'vim.error'>, error('list is locked',))
  1592. ! l[1000] = 3:(<class 'IndexError'>, IndexError('list index out of range',))
  1593. ! >> ListAssSlice
  1594. ! ll[1:100] = "abc":(<class 'vim.error'>, error('list is locked',))
  1595. ! >>> Testing *Iter* using l[:] = %s
  1596. ! l[:] = FailingIter():(<class 'NotImplementedError'>, NotImplementedError())
  1597. ! l[:] = FailingIterNext()::(<class 'NotImplementedError'>, NotImplementedError())
  1598. ! <<< Finished
  1599. ! >>> Testing StringToChars using l[:] = [{%s : 1}]
  1600. ! l[:] = [{1 : 1}]:(<class 'TypeError'>, TypeError('object must be string',))
  1601. ! l[:] = [{u"\0" : 1}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1602. ! l[:] = [{"\0" : 1}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1603. ! <<< Finished
  1604. ! >>> Testing StringToChars using l[:] = [{"abc" : {%s : 1}}]
  1605. ! l[:] = [{"abc" : {1 : 1}}]:(<class 'TypeError'>, TypeError('object must be string',))
  1606. ! l[:] = [{"abc" : {u"\0" : 1}}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1607. ! l[:] = [{"abc" : {"\0" : 1}}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1608. ! <<< Finished
  1609. ! >>> Testing StringToChars using l[:] = [{"abc" : Mapping({%s : 1})}]
  1610. ! l[:] = [{"abc" : Mapping({1 : 1})}]:(<class 'TypeError'>, TypeError('object must be string',))
  1611. ! l[:] = [{"abc" : Mapping({u"\0" : 1})}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1612. ! l[:] = [{"abc" : Mapping({"\0" : 1})}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1613. ! <<< Finished
  1614. ! >>> Testing *Iter* using l[:] = [{"abc" : %s}]
  1615. ! l[:] = [{"abc" : FailingIter()}]:(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1616. ! l[:] = [{"abc" : FailingIterNext()}]:(<class 'NotImplementedError'>, NotImplementedError())
  1617. ! <<< Finished
  1618. ! >>> Testing ConvertFromPyObject using l[:] = [{"abc" : %s}]
  1619. ! l[:] = [{"abc" : None}]:(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1620. ! l[:] = [{"abc" : {"": 1}}]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1621. ! l[:] = [{"abc" : FailingMapping()}]:(<class 'NotImplementedError'>, NotImplementedError())
  1622. ! l[:] = [{"abc" : FailingMappingKey()}]:(<class 'NotImplementedError'>, NotImplementedError())
  1623. ! <<< Finished
  1624. ! >>> Testing StringToChars using l[:] = [Mapping({%s : 1})]
  1625. ! l[:] = [Mapping({1 : 1})]:(<class 'TypeError'>, TypeError('object must be string',))
  1626. ! l[:] = [Mapping({u"\0" : 1})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1627. ! l[:] = [Mapping({"\0" : 1})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1628. ! <<< Finished
  1629. ! >>> Testing StringToChars using l[:] = [Mapping({"abc" : {%s : 1}})]
  1630. ! l[:] = [Mapping({"abc" : {1 : 1}})]:(<class 'TypeError'>, TypeError('object must be string',))
  1631. ! l[:] = [Mapping({"abc" : {u"\0" : 1}})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1632. ! l[:] = [Mapping({"abc" : {"\0" : 1}})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1633. ! <<< Finished
  1634. ! >>> Testing StringToChars using l[:] = [Mapping({"abc" : Mapping({%s : 1})})]
  1635. ! l[:] = [Mapping({"abc" : Mapping({1 : 1})})]:(<class 'TypeError'>, TypeError('object must be string',))
  1636. ! l[:] = [Mapping({"abc" : Mapping({u"\0" : 1})})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1637. ! l[:] = [Mapping({"abc" : Mapping({"\0" : 1})})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1638. ! <<< Finished
  1639. ! >>> Testing *Iter* using l[:] = [Mapping({"abc" : %s})]
  1640. ! l[:] = [Mapping({"abc" : FailingIter()})]:(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1641. ! l[:] = [Mapping({"abc" : FailingIterNext()})]:(<class 'NotImplementedError'>, NotImplementedError())
  1642. ! <<< Finished
  1643. ! >>> Testing ConvertFromPyObject using l[:] = [Mapping({"abc" : %s})]
  1644. ! l[:] = [Mapping({"abc" : None})]:(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1645. ! l[:] = [Mapping({"abc" : {"": 1}})]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1646. ! l[:] = [Mapping({"abc" : FailingMapping()})]:(<class 'NotImplementedError'>, NotImplementedError())
  1647. ! l[:] = [Mapping({"abc" : FailingMappingKey()})]:(<class 'NotImplementedError'>, NotImplementedError())
  1648. ! <<< Finished
  1649. ! >>> Testing *Iter* using l[:] = [%s]
  1650. ! l[:] = [FailingIter()]:(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1651. ! l[:] = [FailingIterNext()]:(<class 'NotImplementedError'>, NotImplementedError())
  1652. ! <<< Finished
  1653. ! >>> Testing ConvertFromPyObject using l[:] = [%s]
  1654. ! l[:] = [None]:(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1655. ! l[:] = [{"": 1}]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1656. ! l[:] = [FailingMapping()]:(<class 'NotImplementedError'>, NotImplementedError())
  1657. ! l[:] = [FailingMappingKey()]:(<class 'NotImplementedError'>, NotImplementedError())
  1658. ! <<< Finished
  1659. ! >> ListConcatInPlace
  1660. ! >>> Testing *Iter* using l.extend(%s)
  1661. ! l.extend(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError())
  1662. ! l.extend(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError())
  1663. ! <<< Finished
  1664. ! >>> Testing StringToChars using l.extend([{%s : 1}])
  1665. ! l.extend([{1 : 1}]):(<class 'TypeError'>, TypeError('object must be string',))
  1666. ! l.extend([{u"\0" : 1}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1667. ! l.extend([{"\0" : 1}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1668. ! <<< Finished
  1669. ! >>> Testing StringToChars using l.extend([{"abc" : {%s : 1}}])
  1670. ! l.extend([{"abc" : {1 : 1}}]):(<class 'TypeError'>, TypeError('object must be string',))
  1671. ! l.extend([{"abc" : {u"\0" : 1}}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1672. ! l.extend([{"abc" : {"\0" : 1}}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1673. ! <<< Finished
  1674. ! >>> Testing StringToChars using l.extend([{"abc" : Mapping({%s : 1})}])
  1675. ! l.extend([{"abc" : Mapping({1 : 1})}]):(<class 'TypeError'>, TypeError('object must be string',))
  1676. ! l.extend([{"abc" : Mapping({u"\0" : 1})}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1677. ! l.extend([{"abc" : Mapping({"\0" : 1})}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1678. ! <<< Finished
  1679. ! >>> Testing *Iter* using l.extend([{"abc" : %s}])
  1680. ! l.extend([{"abc" : FailingIter()}]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1681. ! l.extend([{"abc" : FailingIterNext()}]):(<class 'NotImplementedError'>, NotImplementedError())
  1682. ! <<< Finished
  1683. ! >>> Testing ConvertFromPyObject using l.extend([{"abc" : %s}])
  1684. ! l.extend([{"abc" : None}]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1685. ! l.extend([{"abc" : {"": 1}}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1686. ! l.extend([{"abc" : FailingMapping()}]):(<class 'NotImplementedError'>, NotImplementedError())
  1687. ! l.extend([{"abc" : FailingMappingKey()}]):(<class 'NotImplementedError'>, NotImplementedError())
  1688. ! <<< Finished
  1689. ! >>> Testing StringToChars using l.extend([Mapping({%s : 1})])
  1690. ! l.extend([Mapping({1 : 1})]):(<class 'TypeError'>, TypeError('object must be string',))
  1691. ! l.extend([Mapping({u"\0" : 1})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1692. ! l.extend([Mapping({"\0" : 1})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1693. ! <<< Finished
  1694. ! >>> Testing StringToChars using l.extend([Mapping({"abc" : {%s : 1}})])
  1695. ! l.extend([Mapping({"abc" : {1 : 1}})]):(<class 'TypeError'>, TypeError('object must be string',))
  1696. ! l.extend([Mapping({"abc" : {u"\0" : 1}})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1697. ! l.extend([Mapping({"abc" : {"\0" : 1}})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1698. ! <<< Finished
  1699. ! >>> Testing StringToChars using l.extend([Mapping({"abc" : Mapping({%s : 1})})])
  1700. ! l.extend([Mapping({"abc" : Mapping({1 : 1})})]):(<class 'TypeError'>, TypeError('object must be string',))
  1701. ! l.extend([Mapping({"abc" : Mapping({u"\0" : 1})})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1702. ! l.extend([Mapping({"abc" : Mapping({"\0" : 1})})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1703. ! <<< Finished
  1704. ! >>> Testing *Iter* using l.extend([Mapping({"abc" : %s})])
  1705. ! l.extend([Mapping({"abc" : FailingIter()})]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1706. ! l.extend([Mapping({"abc" : FailingIterNext()})]):(<class 'NotImplementedError'>, NotImplementedError())
  1707. ! <<< Finished
  1708. ! >>> Testing ConvertFromPyObject using l.extend([Mapping({"abc" : %s})])
  1709. ! l.extend([Mapping({"abc" : None})]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1710. ! l.extend([Mapping({"abc" : {"": 1}})]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1711. ! l.extend([Mapping({"abc" : FailingMapping()})]):(<class 'NotImplementedError'>, NotImplementedError())
  1712. ! l.extend([Mapping({"abc" : FailingMappingKey()})]):(<class 'NotImplementedError'>, NotImplementedError())
  1713. ! <<< Finished
  1714. ! >>> Testing *Iter* using l.extend([%s])
  1715. ! l.extend([FailingIter()]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1716. ! l.extend([FailingIterNext()]):(<class 'NotImplementedError'>, NotImplementedError())
  1717. ! <<< Finished
  1718. ! >>> Testing ConvertFromPyObject using l.extend([%s])
  1719. ! l.extend([None]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1720. ! l.extend([{"": 1}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1721. ! l.extend([FailingMapping()]):(<class 'NotImplementedError'>, NotImplementedError())
  1722. ! l.extend([FailingMappingKey()]):(<class 'NotImplementedError'>, NotImplementedError())
  1723. ! <<< Finished
  1724. ! >> ListSetattr
  1725. ! del l.locked:(<class 'AttributeError'>, AttributeError('cannot delete vim.List attributes',))
  1726. ! l.locked = FailingTrue():(<class 'NotImplementedError'>, NotImplementedError())
  1727. ! l.xxx = True:(<class 'AttributeError'>, AttributeError('cannot set this attribute',))
  1728. ! > Function
  1729. ! >> FunctionConstructor
  1730. ! vim.Function("123"):(<class 'ValueError'>, ValueError('unnamed function does not exist',))
  1731. ! vim.Function("xxx_non_existent_function_xxx"):(<class 'ValueError'>, ValueError('function does not exist',))
  1732. ! vim.Function("xxx#non#existent#function#xxx"):(<class 'ValueError'>, ValueError('function does not exist',))
  1733. ! >> FunctionCall
  1734. ! >>> Testing StringToChars using f({%s : 1})
  1735. ! f({1 : 1}):(<class 'TypeError'>, TypeError('object must be string',))
  1736. ! f({u"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1737. ! f({"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1738. ! <<< Finished
  1739. ! >>> Testing StringToChars using f({"abc" : {%s : 1}})
  1740. ! f({"abc" : {1 : 1}}):(<class 'TypeError'>, TypeError('object must be string',))
  1741. ! f({"abc" : {u"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1742. ! f({"abc" : {"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1743. ! <<< Finished
  1744. ! >>> Testing StringToChars using f({"abc" : Mapping({%s : 1})})
  1745. ! f({"abc" : Mapping({1 : 1})}):(<class 'TypeError'>, TypeError('object must be string',))
  1746. ! f({"abc" : Mapping({u"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1747. ! f({"abc" : Mapping({"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1748. ! <<< Finished
  1749. ! >>> Testing *Iter* using f({"abc" : %s})
  1750. ! f({"abc" : FailingIter()}):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1751. ! f({"abc" : FailingIterNext()}):(<class 'NotImplementedError'>, NotImplementedError())
  1752. ! <<< Finished
  1753. ! >>> Testing ConvertFromPyObject using f({"abc" : %s})
  1754. ! f({"abc" : None}):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1755. ! f({"abc" : {"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1756. ! f({"abc" : FailingMapping()}):(<class 'NotImplementedError'>, NotImplementedError())
  1757. ! f({"abc" : FailingMappingKey()}):(<class 'NotImplementedError'>, NotImplementedError())
  1758. ! <<< Finished
  1759. ! >>> Testing StringToChars using f(Mapping({%s : 1}))
  1760. ! f(Mapping({1 : 1})):(<class 'TypeError'>, TypeError('object must be string',))
  1761. ! f(Mapping({u"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1762. ! f(Mapping({"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1763. ! <<< Finished
  1764. ! >>> Testing StringToChars using f(Mapping({"abc" : {%s : 1}}))
  1765. ! f(Mapping({"abc" : {1 : 1}})):(<class 'TypeError'>, TypeError('object must be string',))
  1766. ! f(Mapping({"abc" : {u"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1767. ! f(Mapping({"abc" : {"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1768. ! <<< Finished
  1769. ! >>> Testing StringToChars using f(Mapping({"abc" : Mapping({%s : 1})}))
  1770. ! f(Mapping({"abc" : Mapping({1 : 1})})):(<class 'TypeError'>, TypeError('object must be string',))
  1771. ! f(Mapping({"abc" : Mapping({u"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1772. ! f(Mapping({"abc" : Mapping({"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1773. ! <<< Finished
  1774. ! >>> Testing *Iter* using f(Mapping({"abc" : %s}))
  1775. ! f(Mapping({"abc" : FailingIter()})):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1776. ! f(Mapping({"abc" : FailingIterNext()})):(<class 'NotImplementedError'>, NotImplementedError())
  1777. ! <<< Finished
  1778. ! >>> Testing ConvertFromPyObject using f(Mapping({"abc" : %s}))
  1779. ! f(Mapping({"abc" : None})):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1780. ! f(Mapping({"abc" : {"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1781. ! f(Mapping({"abc" : FailingMapping()})):(<class 'NotImplementedError'>, NotImplementedError())
  1782. ! f(Mapping({"abc" : FailingMappingKey()})):(<class 'NotImplementedError'>, NotImplementedError())
  1783. ! <<< Finished
  1784. ! >>> Testing *Iter* using f(%s)
  1785. ! f(FailingIter()):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1786. ! f(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError())
  1787. ! <<< Finished
  1788. ! >>> Testing ConvertFromPyObject using f(%s)
  1789. ! f(None):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1790. ! f({"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1791. ! f(FailingMapping()):(<class 'NotImplementedError'>, NotImplementedError())
  1792. ! f(FailingMappingKey()):(<class 'NotImplementedError'>, NotImplementedError())
  1793. ! <<< Finished
  1794. ! >>> Testing StringToChars using fd(self={%s : 1})
  1795. ! fd(self={1 : 1}):(<class 'TypeError'>, TypeError('object must be string',))
  1796. ! fd(self={u"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1797. ! fd(self={"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1798. ! <<< Finished
  1799. ! >>> Testing StringToChars using fd(self={"abc" : {%s : 1}})
  1800. ! fd(self={"abc" : {1 : 1}}):(<class 'TypeError'>, TypeError('object must be string',))
  1801. ! fd(self={"abc" : {u"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1802. ! fd(self={"abc" : {"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1803. ! <<< Finished
  1804. ! >>> Testing StringToChars using fd(self={"abc" : Mapping({%s : 1})})
  1805. ! fd(self={"abc" : Mapping({1 : 1})}):(<class 'TypeError'>, TypeError('object must be string',))
  1806. ! fd(self={"abc" : Mapping({u"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1807. ! fd(self={"abc" : Mapping({"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1808. ! <<< Finished
  1809. ! >>> Testing *Iter* using fd(self={"abc" : %s})
  1810. ! fd(self={"abc" : FailingIter()}):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1811. ! fd(self={"abc" : FailingIterNext()}):(<class 'NotImplementedError'>, NotImplementedError())
  1812. ! <<< Finished
  1813. ! >>> Testing ConvertFromPyObject using fd(self={"abc" : %s})
  1814. ! fd(self={"abc" : None}):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1815. ! fd(self={"abc" : {"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1816. ! fd(self={"abc" : FailingMapping()}):(<class 'NotImplementedError'>, NotImplementedError())
  1817. ! fd(self={"abc" : FailingMappingKey()}):(<class 'NotImplementedError'>, NotImplementedError())
  1818. ! <<< Finished
  1819. ! >>> Testing StringToChars using fd(self=Mapping({%s : 1}))
  1820. ! fd(self=Mapping({1 : 1})):(<class 'TypeError'>, TypeError('object must be string',))
  1821. ! fd(self=Mapping({u"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1822. ! fd(self=Mapping({"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1823. ! <<< Finished
  1824. ! >>> Testing StringToChars using fd(self=Mapping({"abc" : {%s : 1}}))
  1825. ! fd(self=Mapping({"abc" : {1 : 1}})):(<class 'TypeError'>, TypeError('object must be string',))
  1826. ! fd(self=Mapping({"abc" : {u"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1827. ! fd(self=Mapping({"abc" : {"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1828. ! <<< Finished
  1829. ! >>> Testing StringToChars using fd(self=Mapping({"abc" : Mapping({%s : 1})}))
  1830. ! fd(self=Mapping({"abc" : Mapping({1 : 1})})):(<class 'TypeError'>, TypeError('object must be string',))
  1831. ! fd(self=Mapping({"abc" : Mapping({u"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1832. ! fd(self=Mapping({"abc" : Mapping({"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
  1833. ! <<< Finished
  1834. ! >>> Testing *Iter* using fd(self=Mapping({"abc" : %s}))
  1835. ! fd(self=Mapping({"abc" : FailingIter()})):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1836. ! fd(self=Mapping({"abc" : FailingIterNext()})):(<class 'NotImplementedError'>, NotImplementedError())
  1837. ! <<< Finished
  1838. ! >>> Testing ConvertFromPyObject using fd(self=Mapping({"abc" : %s}))
  1839. ! fd(self=Mapping({"abc" : None})):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  1840. ! fd(self=Mapping({"abc" : {"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1841. ! fd(self=Mapping({"abc" : FailingMapping()})):(<class 'NotImplementedError'>, NotImplementedError())
  1842. ! fd(self=Mapping({"abc" : FailingMappingKey()})):(<class 'NotImplementedError'>, NotImplementedError())
  1843. ! <<< Finished
  1844. ! >>> Testing *Iter* using fd(self=%s)
  1845. ! fd(self=FailingIter()):(<class 'TypeError'>, TypeError('unable to convert object to vim dictionary',))
  1846. ! fd(self=FailingIterNext()):(<class 'TypeError'>, TypeError('unable to convert object to vim dictionary',))
  1847. ! <<< Finished
  1848. ! >>> Testing ConvertFromPyObject using fd(self=%s)
  1849. ! fd(self=None):(<class 'TypeError'>, TypeError('unable to convert object to vim dictionary',))
  1850. ! fd(self={"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  1851. ! fd(self=FailingMapping()):(<class 'NotImplementedError'>, NotImplementedError())
  1852. ! fd(self=FailingMappingKey()):(<class 'NotImplementedError'>, NotImplementedError())
  1853. ! <<< Finished
  1854. ! >>> Testing ConvertFromPyMapping using fd(self=%s)
  1855. ! fd(self=[]):(<class 'AttributeError'>, AttributeError("'list' object has no attribute 'keys'",))
  1856. ! <<< Finished
  1857. ! > TabPage
  1858. ! >> TabPageAttr
  1859. ! vim.current.tabpage.xxx:(<class 'AttributeError'>, AttributeError("'vim.tabpage' object has no attribute 'xxx'",))
  1860. ! > TabList
  1861. ! >> TabListItem
  1862. ! vim.tabpages[1000]:(<class 'IndexError'>, IndexError('no such tab page',))
  1863. ! > Window
  1864. ! >> WindowAttr
  1865. ! vim.current.window.xxx:(<class 'AttributeError'>, AttributeError("'vim.window' object has no attribute 'xxx'",))
  1866. ! >> WindowSetattr
  1867. ! vim.current.window.buffer = 0:(<class 'TypeError'>, TypeError('readonly attribute',))
  1868. ! vim.current.window.cursor = (10000000000, 100000000):(<class 'vim.error'>, error('cursor position outside buffer',))
  1869. ! vim.current.window.cursor = True:(<class 'TypeError'>, TypeError('argument must be 2-item sequence, not bool',))
  1870. ! vim.current.window.height = "abc":(<class 'TypeError'>, TypeError('an integer is required',))
  1871. ! vim.current.window.width  = "abc":(<class 'TypeError'>, TypeError('an integer is required',))
  1872. ! vim.current.window.xxxxxx = True:(<class 'AttributeError'>, AttributeError('xxxxxx',))
  1873. ! > WinList
  1874. ! >> WinListItem
  1875. ! vim.windows[1000]:(<class 'IndexError'>, IndexError('no such window',))
  1876. ! > Buffer
  1877. ! >> StringToLine (indirect)
  1878. ! vim.current.buffer[0] = "\na":(<class 'vim.error'>, error('string cannot contain newlines',))
  1879. ! >> SetBufferLine (indirect)
  1880. ! vim.current.buffer[0] = True:(<class 'TypeError'>, TypeError('bad argument type for built-in operation',))
  1881. ! >> SetBufferLines (indirect)
  1882. ! vim.current.buffer[:] = True:(<class 'TypeError'>, TypeError('bad argument type for built-in operation',))
  1883. ! vim.current.buffer[:] = ["\na", "bc"]:(<class 'vim.error'>, error('string cannot contain newlines',))
  1884. ! >> InsertBufferLines (indirect)
  1885. ! vim.current.buffer.append(None):(<class 'TypeError'>, TypeError('bad argument type for built-in operation',))
  1886. ! vim.current.buffer.append(["\na", "bc"]):(<class 'vim.error'>, error('string cannot contain newlines',))
  1887. ! vim.current.buffer.append("\nbc"):(<class 'vim.error'>, error('string cannot contain newlines',))
  1888. ! >> RBItem
  1889. ! vim.current.buffer[10000000000]:(<class 'IndexError'>, IndexError('line number out of range',))
  1890. ! >> RBAsItem
  1891. ! vim.current.buffer[10000000000] = "":(<class 'IndexError'>, IndexError('line number out of range',))
  1892. ! >> BufferAttr
  1893. ! vim.current.buffer.xxx:(<class 'AttributeError'>, AttributeError("'vim.buffer' object has no attribute 'xxx'",))
  1894. ! >> BufferSetattr
  1895. ! vim.current.buffer.name = True:(<class 'TypeError'>, TypeError('object must be string',))
  1896. ! vim.current.buffer.xxx = True:(<class 'AttributeError'>, AttributeError('xxx',))
  1897. ! >> BufferMark
  1898. ! vim.current.buffer.mark(0):(<class 'TypeError'>, TypeError('must be str, not int',))
  1899. ! vim.current.buffer.mark("abc"):(<class 'ValueError'>, ValueError('mark name must be a single character',))
  1900. ! vim.current.buffer.mark("!"):(<class 'vim.error'>, error('invalid mark name',))
  1901. ! >> BufferRange
  1902. ! vim.current.buffer.range(1, 2, 3):(<class 'TypeError'>, TypeError('function takes exactly 2 arguments (3 given)',))
  1903. ! > BufMap
  1904. ! >> BufMapItem
  1905. ! vim.buffers[None]:(<class 'TypeError'>, TypeError('key must be integer',))
  1906. ! vim.buffers[100000000]:(<class 'KeyError'>, KeyError(100000000,))
  1907. ! > Current
  1908. ! >> CurrentGetattr
  1909. ! vim.current.xxx:(<class 'AttributeError'>, AttributeError("'vim.currentdata' object has no attribute 'xxx'",))
  1910. ! >> CurrentSetattr
  1911. ! vim.current.line = True:(<class 'TypeError'>, TypeError('bad argument type for built-in operation',))
  1912. ! vim.current.buffer = True:(<class 'TypeError'>, TypeError('expected vim.Buffer object',))
  1913. ! vim.current.window = True:(<class 'TypeError'>, TypeError('expected vim.Window object',))
  1914. ! vim.current.tabpage = True:(<class 'TypeError'>, TypeError('expected vim.TabPage object',))
  1915. ! vim.current.xxx = True:(<class 'AttributeError'>, AttributeError('xxx',))
  1916. ! vim.command("throw 'abc'"):(<class 'vim.error'>, error('abc',))
  1917. ! Exe("throw 'def'"):(<class 'vim.error'>, error('def',))
  1918. ! vim.eval("Exe('throw ''ghi''')"):(<class 'vim.error'>, error('ghi',))
  1919. ! vim.eval("Exe('echoerr ''jkl''')"):(<class 'vim.error'>, error('Vim(echoerr):jkl',))
  1920. ! vim.eval("Exe('xxx_non_existent_command_xxx')"):(<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',))
  1921. ! vim.bindeval("Exe('xxx_non_existent_command_xxx')"):(<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',))
  1922. *** ../vim-7.3.1065/src/version.c    2013-05-30 13:22:07.000000000 +0200
  1923. --- src/version.c    2013-05-30 13:24:41.000000000 +0200
  1924. ***************
  1925. *** 730,731 ****
  1926. --- 730,733 ----
  1927.   {   /* Add new patch number below this line */
  1928. + /**/
  1929. +     1066,
  1930.   /**/
  1931.  
  1932. -- 
  1933. If Pacman had affected us as kids we'd be running around in dark rooms,
  1934. munching pills and listening to repetitive music.
  1935.                        -- Marcus Brigstocke
  1936.  
  1937.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  1938. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  1939. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  1940.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  1941.