]> granicus.if.org Git - python/commit
[3.7] bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior...
authorAmmar Askar <ammar_askar@hotmail.com>
Fri, 6 Jul 2018 10:21:05 +0000 (06:21 -0400)
committerTal Einat <taleinat+github@gmail.com>
Fri, 6 Jul 2018 10:21:05 +0000 (13:21 +0300)
commitab75d9e4244ee24bc96ea9d52362899e3bf365a2
tree8cb346e5bdbce3ffe84799b1222fc5450726ea22
parent625755eb8cc2d10e02b06fb8f296252c5238a1ef
[3.7] bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior (GH-7891) (GH-8132)

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.

(cherry picked from commit c4ef4896eac86a6759901c8546e26de4695a1389)
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]