]> granicus.if.org Git - python/commit
bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior (GH-7891)
authorAmmar Askar <ammar_askar@hotmail.com>
Fri, 6 Jul 2018 07:19:08 +0000 (03:19 -0400)
committerTal Einat <taleinat+github@gmail.com>
Fri, 6 Jul 2018 07:19:08 +0000 (10:19 +0300)
commitc4ef4896eac86a6759901c8546e26de4695a1389
tree47ad8191fbe9f8fe4bb4272509410bc229ec7c6e
parent3c8aae9ffe13d0f2ad4ff81cdf56bc6393af362a
bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior (GH-7891)

Most of the change involves fixing up the test suite, which previously made
the assumption that there wouldn't be a new line if the input didn't end in
one.

Contributed by Ammar Askar.
Lib/test/test_tokenize.py
Lib/tokenize.py
Misc/NEWS.d/next/Library/2018-06-24-01-57-14.bpo-33899.IaOcAr.rst [new file with mode: 0644]