Loading ...
Sorry, an error occurred while loading the content.

71468Re: [PATCH] (9/7) Consistency and refactoring

Expand Messages
  • Bram Moolenaar
    Jun 23, 2013
    • 0 Attachment
      ZyX wrote:

      > Wrong patch. Correct one:
      >
      > # HG changeset patch
      > # User ZyX <kp-pav@...>
      > # Date 1371441247 -14400
      > # Mon Jun 17 07:54:07 2013 +0400
      > # Branch python-fixes
      > # Node ID 42e166b5c6ff07cd7810780b1d3704b8ce61bac0
      > # Parent 4a00cd941a883917f6d740f9f06aca7baadcb45e
      > Add NUMBER_UNSIGNED to WindowSetattr(, "width"|"height")
      > And more tests
      >
      > Note: in ee('import failing') it was expected to raise NotImplementedError, but
      > actually raises ImportError

      After including this patch test 86 and 87 fail. Test 87 has only a
      small diff:

      --- testdir/test87.failed 2013-06-23 14:45:47.000000000 +0200
      +++ testdir/test87.ok 2013-06-23 14:43:28.000000000 +0200
      @@ -1175,6 +1175,9 @@
      3,xx
      before
      after
      +pythonx/topmodule/__init__.py
      +pythonx/topmodule/submodule/__init__.py
      +pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py
      vim.command("throw 'abcN'"):(<class 'vim.error'>, error('abcN',))
      Exe("throw 'def'"):(<class 'vim.error'>, error('def',))
      vim.eval("Exe('throw ''ghi''')"):(<class 'vim.error'>, error('ghi',))


      Test 86 has very many differences. Here are a few typical examples:

      --- testdir/test86.failed 2013-06-23 14:44:51.000000000 +0200
      +++ testdir/test86.ok 2013-06-23 14:43:28.000000000 +0200
      @@ -550,7 +550,7 @@
      d["a"] = {"abcF" : {u"": 1}}:ValueError:('empty keys are not allowed',)
      d["a"] = {"abcF" : FailingMapping()}:NotImplementedError:()
      d["a"] = {"abcF" : FailingMappingKey()}:NotImplementedError:()
      -d["a"] = {"abcF" : FailingNumber()}:TypeError:("long() argument must be a string or a number, not 'FailingNumber'",)
      +d["a"] = {"abcF" : FailingNumber()}:TypeError:('long() argument must be a string or a number',)
      <<< Finished
      >>> Testing StringToChars using d["a"] = Mapping({%s : 1})
      d["a"] = Mapping({1 : 1}):TypeError:('expected str() or unicode() instance, but got int',)


      @@ -652,7 +652,7 @@
      d.update(Mapping({"abcG" : {u"": 1}})):ValueError:('empty keys are not allowed',)
      d.update(Mapping({"abcG" : FailingMapping()})):NotImplementedError:()
      d.update(Mapping({"abcG" : FailingMappingKey()})):NotImplementedError:()
      -d.update(Mapping({"abcG" : FailingNumber()})):TypeError:("long() argument must be a string or a number, not 'FailingNumber'",)
      +d.update(Mapping({"abcG" : FailingNumber()})):TypeError:('long() argument must be a string or a number',)
      <<< Finished
      >>> Testing *Iter* using d.update(%s)
      d.update(FailingIter()):NotImplementedError:()


      @@ -824,11 +824,371 @@
      ll[1:100] = "abcJ":error:('list is locked',)
      >>> Testing *Iter* using l[:] = %s
      l[:] = FailingIter():NotImplementedError:()
      +l[:] = FailingIterNext():NotImplementedError:()
      +<<< Finished
      +>>> Testing StringToChars using l[:] = [{%s : 1}]
      +l[:] = [{1 : 1}]:TypeError:('expected str() or unicode() instance, but got int',)
      +l[:] = [{u"\0" : 1}]:TypeError:('expected string without null bytes',)
      +l[:] = [{"\0" : 1}]:TypeError:('expected string without null bytes',)
      +<<< Finished
      +>>> Testing StringToChars using l[:] = [{"abcF" : {%s : 1}}]
      +l[:] = [{"abcF" : {1 : 1}}]:TypeError:('expected str() or unicode() instance, but got int',)
      +l[:] = [{"abcF" : {u"\0" : 1}}]:TypeError:('expected string without null bytes',)
      +l[:] = [{"abcF" : {"\0" : 1}}]:TypeError:('expected string without null bytes',)
      [...]


      I suspect following patches won't apply cleanly without this one, thus I
      will stop here. Please start a new sequence of patches against
      7.3.1233.

      --
      ARTHUR: (as the MAN next to him is squashed by a sheep) Knights! Run away!
      Midst echoing shouts of "run away" the KNIGHTS retreat to cover with the odd
      cow or goose hitting them still. The KNIGHTS crouch down under cover.
      "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ an exciting new programming language -- http://www.Zimbu.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 25 messages in this topic